Daniel Berlin wrote:
On Fri, 2006-01-20 at 10:53 +0530, Ranjit Mathew wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi,
Mainline fails to bootstrap for me (revision 110017)
on i686-pc-linux-gnu.
Configured as:
$GCC_SRC_DIR/configure --prefix=$HOME/gcc --enable-languages=c,c++,java \
- --with-as=/home/ranmath/gnu/bin/as --with-gnu-as \
- --with-ld=/home/ranmath/gnu/bin/ld --with-gnu-ld \
- --with-arch=pentium4 --with-tune=pentium4 \
- --disable-nls --disable-checking --disable-libmudflap \
- --disable-debug --enable-threads=posix --enable-__cxa_atexit \
- --disable-static
Kenny thought it would be nice, rather than pass the actual bb info to free to
the freeing function, to instead pass some random bitmap.
The attached fixes *that*, but this just causes a crash deeper in trying to
free some chains.
However, it looks like that is either caused by a double free, or because
we never null out pointers to things after we free the memory for what they
are pointing to.
------------------------------------------------------------------------
Index: df-core.c
===================================================================
--- df-core.c (revision 110017)
+++ df-core.c (working copy)
@@ -292,6 +292,7 @@ are write-only operations.
static struct df *ddf = NULL;
struct df *shared_df = NULL;
+static void * df_get_bb_info (struct dataflow *, unsigned int);
/*----------------------------------------------------------------------------
Functions to create, destroy and manipulate an instance of df.
----------------------------------------------------------------------------*/
@@ -370,7 +371,7 @@ df_set_blocks (struct df *df, bitmap blo
EXECUTE_IF_SET_IN_BITMAP (diff, 0, bb_index, bi)
{
basic_block bb = BASIC_BLOCK (bb_index);
- (*dflow->problem->free_bb_fun) (dflow, bb, diff);
+ (*dflow->problem->free_bb_fun) (dflow, bb, df_get_bb_info
(dflow, bb_index));
}
}
}
This is why c sucks. In any language with a reasonable type system,
this could have been written with a subtype and would not require using
a void * arg.
Sorry for the problems and thanks for looking into them.
kenny