This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libgcj/22189] Table Full in gcj-dbtool if -m option used with smallest possible input
- From: "greenrd at greenrd dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 26 Jun 2005 12:39:17 -0000
- Subject: [Bug libgcj/22189] Table Full in gcj-dbtool if -m option used with smallest possible input
- References: <20050626024115.22189.greenrd@greenrd.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From greenrd at greenrd dot org 2005-06-26 12:39 -------
The problem is that a PersistentByteMap of capacity 1 is created by -m, but when
a PersistentByteMap is created with capacity 1, its capacity method incorrectly
returns 0.
This is because, when it is created, confusingly, the capacity field is set to
(int) (capacity*3/2),which in this case is 1, and the capacity() method then
returns (int) (the capacity field * 2 / 3), which is (int) (2 * 1 / 3) = 0.
The first thing I would do is, we have 3 things (initial capacity, capacity
field, capacity method), all with the same name, but not meaning the same thing,
so I would do some renames to avoid confusion. Then I would fix the actual bug.
Preparing a patch.
--
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |greenrd at greenrd dot org
|dot org |
Status|NEW |ASSIGNED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22189