fyi: gengtype patches checked in

Steve Ellcey sje@cup.hp.com
Tue Mar 27 21:25:00 GMT 2007


gengtype is seg faulting on IA64 HP-UX.  It looks like oprintf in
gcc/gengtype.c is calling vsnprintf when o->buf is NULL and expecting it
to return zero and then fix things up later.  On IA64 HP-UX the call to
vsnprintf is giving a seg fault when o->buf is NULL.

I tried putting that chunk of code in side "if (o->buf)" and
initializing slength to zero but now I hit the "gcc_assert (slen2 ==
slength)" and wind up stopping there.

Steve Ellcey
sje@cup.hp.com

(gdb) bt
#0  0x200000007e6ff6e0:1 in T_19_f81_cl___doprnt_main+0xd91 ()
   from /usr/lib/hpux32/libc.so.1
#1  0x200000007e6f6570:0 in _doprnt+0x30 () from /usr/lib/hpux32/libc.so.1
#2  0x200000007e71f000:0 in vsnprintf+0xa0 () from /usr/lib/hpux32/libc.so.1
#3  0x40132d0:0 in oprintf (o=0x20000000, format=0x7ffff170 "\004")
    at /proj/opensrc/nightly/src/trunk/gcc/gengtype.c:1488
#4  0x4013040:0 in create_file (
    name=0x20000000 <Error reading address 0x20000000: Bad address>,
    oname=0x7ffff180 "@\017\244 ")
    at /proj/opensrc/nightly/src/trunk/gcc/gengtype.c:1472
#5  0x40137b0:0 in open_base_files ()
    at /proj/opensrc/nightly/src/trunk/gcc/gengtype.c:1528
#6  0x4027800:0 in main (argc=536870912, argv=0x7e7a3b10)
    at /proj/opensrc/nightly/src/trunk/gcc/gengtype.c:3560



More information about the Gcc-patches mailing list