Re: signed char bug in regexp library

2004-02-18 Thread Mikulas Patocka
> > Hi > > > > I ripped regexp library from FreeBSD 4 and use it in another program. I > > get random crashes because the library casts char to int and uses it as > > array index ... the most obvious case is engine.i:189: > > register char *dp; > > dp += charjump[(int)*dp]; > > but there are many m

Re: signed char bug in regexp library

2004-02-17 Thread Tim Kientzle
Mikulas Patocka wrote: Hi I ripped regexp library from FreeBSD 4 and use it in another program. I get random crashes because the library casts char to int and uses it as array index ... the most obvious case is engine.i:189: register char *dp; dp += charjump[(int)*dp]; but there are many more and

Re: signed char bug in regexp library

2004-02-17 Thread Tim Kientzle
Mikulas Patocka wrote: Hi I ripped regexp library from FreeBSD 4 and use it in another program. I get random crashes because the library casts char to int and uses it as array index ... the most obvious case is engine.i:189: register char *dp; dp += charjump[(int)*dp]; but there are many more and

Re: signed char bug in regexp library

2004-02-17 Thread David Malone
On Mon, Feb 16, 2004 at 08:50:39PM +0100, Mikulas Patocka wrote: > When i compile library with -funsigned-char, it works fine. But it isn't > compiled with that flag in FreeBSD. The signedness of chars is left as a choice for the compiler - on the platform you are working on they must have decided

signed char bug in regexp library

2004-02-17 Thread Mikulas Patocka
Hi I ripped regexp library from FreeBSD 4 and use it in another program. I get random crashes because the library casts char to int and uses it as array index ... the most obvious case is engine.i:189: register char *dp; dp += charjump[(int)*dp]; but there are many more and I'm unable to spot them