gpi-hash.c segfaults_(re)

Tue, 22 Jul 1997 13:07:43 +0200 (MET DST)


According to peter:
>From peter Tue Jul 22 12:41:31 1997
gpi-hash.c segfaults
To: gpc@hut.fi
Tue, 22 Jul 1997 12:41:31 +0200 (MEST)
X-Mailer: ELM [version 2.4 PL25]
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
Content-Length: 1483      

According to Bill Currie:
> 
> I just applied both sets of patches to gpc to take it up to 970721 
> (hopefully properly) and unfortunatly, gpc still segfaults in 
> get_uid.
> [...]
> Hmm, I just tried out my previous sample file (under windows 95) and 
> got a crash as well, so my above reasoning may be incorrect.

As you probably were afraid of already, I cannot reproduce the bug.  :-(

> Call frame traceback EIPs:
>   0x000ee4d0   _get_uid+32, line 134 of gpi-hash.c
>   [...]

Just to be sure that we are talking about the same GPC:
My line 134 of gpi-hash.c reads

    for (l = hash_table[hi]; l && l->node; l =l->next)

If the "l &&" is missing or commented out in your version, this would be
the origin of the error.  :-(But it isn't.  That would be too easy.)

> the command line uses was:gpc -O2 -o foo.o -c foo.pas

It compiles fine on my system:

    % gpc -O2 -o foo.o -c foo.pas
    foo.pas: In function `Dectobin':
    foo.pas:22: warning: return value of function not assigned

> Sigh, this is getting frustrating (and probably more so for you, 
> Peter)

Such is life.  But it's good that you have found this error *now*
and not later when gpc-2.1 will be released.  That's what beta
test phases are for.  Thanks a lot for your patience with GPC!

Greetings,

    Peter

 Dipl.-Phys. Peter Gerwinski, Essen, Germany, free physicist and programmer
peter.gerwinski@uni-essen.de - http://home.pages.de/~peter.gerwinski/ [970201]
 maintainer GNU Pascal [970714] - http://home.pages.de/~gnu-pascal/ [970125]


Peter Gerwinski (peter@agnes.dida.physik.uni-essen.de)

HTML conversion by Lluís de Yzaguirre i Maura
Institut de Lingüística Aplicada - Universitat "Pompeu Fabra"
e-mail: de_yza@upf.es