Daniel Berlin <[EMAIL PROTECTED]> writes:
| On Sat, 2005-05-21 at 18:55 +0200, Andreas Jaeger wrote:
| > Gabriel Dos Reis <[EMAIL PROTECTED]> writes:
| >
| > > Hi again,
| > >
| > > I just hit this one from tree-ssa-into.c:rewrite_into_ssa()
| > >
| > > /* Initialize dominance frontier. */
| > > dfs = (bitmap *) xmalloc (last_basic_block * sizeof (bitmap *));
| > > ^^^^^^^^
| > >
| > > If the sizeof operand really supposed to be "bitmap*" and not "bitmap"?
| >
| > This indeed looks wrong - and could lead to real memory corruption
| > :-(. If this is wrong, he should be changed on the 4.0 branch as
| > well,
|
| It's wrong, but it couldn't lead to actual memory corruption, since
| sizeof (bitmap) == sizeof (bitmap *), since both are pointers.
Similarly, we have this in cselib.c:
static struct elt_list **reg_values;
[...]
reg_values = xcalloc (reg_values_size, sizeof (reg_values));
^^^^^^^^^^
that should have been
reg_values = xcalloc (reg_values_size, sizeof (*reg_values));
-- Gaby