This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: GCC build failed for 2 targets with your patch on 2002-05-08T02:27:43Z.
- From: Tom Tromey <tromey at redhat dot com>
- To: gcc-regression at gcc dot gnu dot org
- Cc: davem at redhat dot com, janis187 at us dot ibm dot com, kazu at cs dot umass dot edu, Gcc Patch List <gcc-patches at gcc dot gnu dot org>, Java Patch List <java-patches at gcc dot gnu dot org>
- Date: 07 May 2002 23:01:06 -0600
- Subject: Re: GCC build failed for 2 targets with your patch on 2002-05-08T02:27:43Z.
- References: <200205080445.g484jhx24553@maat.sfbay.redhat.com>
- Reply-to: tromey at redhat dot com
>>>>> "Regress" == GCC regression checker <regress@redhat.com> writes:
Regress> stage1/xgcc -Bstage1/ -B/maat/heart/tbox/objs/i686-pc-linux-gnu/bin/ -c -DIN_GCC -g -O2 -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -DHAVE_CONFIG_H -I. -Ijava -I/maat/heart/tbox/cvs-gcc/gcc/gcc -I/maat/heart/tbox/cvs-gcc/gcc/gcc/java -I/maat/heart/tbox/cvs-gcc/gcc/gcc/config -I/maat/heart/tbox/cvs-gcc/gcc/gcc/../include /maat/heart/tbox/cvs-gcc/gcc/gcc/java/gjavah.c -o java/gjavah.o
Regress> /maat/heart/tbox/cvs-gcc/gcc/gcc/java/gjavah.c:1140:13: attempt to use poisoned "strdup"
Regress> /maat/heart/tbox/cvs-gcc/gcc/gcc/java/gjavah.c:1144:13: attempt to use poisoned "strdup"
Sorry, that's mine.
I'm checking in the appended fix.
Tom
Index: ChangeLog
from Tom Tromey <tromey@redhat.com>
* gjavah.c (throwable_p): Use xstrdup, not strdup.
Index: gjavah.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/java/gjavah.c,v
retrieving revision 1.87
diff -u -r1.87 gjavah.c
--- gjavah.c 8 May 2002 01:41:41 -0000 1.87
+++ gjavah.c 8 May 2002 04:49:29 -0000
@@ -1137,11 +1137,11 @@
(htab_del) free);
/* Make sure the root classes show up in the tables. */
- str = strdup ("java.lang.Throwable");
+ str = xstrdup ("java.lang.Throwable");
slot = htab_find_slot (throw_hash, str, INSERT);
*slot = (PTR) str;
- str = strdup ("java.lang.Object");
+ str = xstrdup ("java.lang.Object");
slot = htab_find_slot (non_throw_hash, str, INSERT);
*slot = (PTR) str;