This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: endless loop in jc1
- To: gcc-patches at gcc dot gnu dot org
- Subject: Re: endless loop in jc1
- From: Alexandre Petit-Bianco <apbianco at deliverance dot cygnus dot com>
- Date: 14 May 2000 00:10:22 -0700
- Newsgroups: cygnus.egcs.patches
- Organization: Cygnus Support
- References: <orwvl2mu57.fsf@zecarneiro.lsd.ic.unicamp.br>
Alexandre Oliva <aoliva@cygnus.com> writes:
> I've stumbled across this one while building GCC+libgcj with current
> CVS. Ok to install?
> ...
> Index: gcc/java/ChangeLog
> from Alexandre Oliva <oliva@lsd.ic.unicamp.br>
>
> * jcf-write.c (generate_classfile): Scan the source_file for
> slashes with the right pointer variable.
Yes. The bug was introduced by Zack's last `char *' constify
patch:
apbianco@kazmo[~/src/egcs/gcc/java]: cvs diff -r1.54 -r1.53 jcf-write.c
...
@@ -3064,13 +3064,13 @@ generate_classfile (clas, state)
ptr = methods_count_ptr; UNSAFE_PUT2 (methods_count);
source_file = DECL_SOURCE_FILE (TYPE_NAME (clas));
- for (ptr = source_file; ; ptr++)
+ for (s = source_file; ; s++)
{
char ch = *ptr;
if (ch == '\0')
break;
if (ch == '/' || ch == '\\')
- source_file = ptr+1;
+ source_file = s+1;
}
ptr = append_chunk (NULL, 10, state);
I didn't get a chance to review is patch (IFAIR.) Thank you for
tracking this down.
./A