Re: [sqlite] Bug and fix in lemon.c

2014-09-16 Thread Benjamin Franksen
Am Freitag, 12. September 2014, 18:59:24 schrieb Richard Hipp:
> On Fri, Sep 12, 2014 at 7:23 AM, Benjamin Franksen <
> benjamin.frank...@helmholtz-berlin.de> wrote:
> > I am using the lemon parser generator for a different project. It
> > appears that an attempt to pro-actively avoid a 64-bit problem in fact
> > created one in the first place. I am referring to the following change:
> >
> >
> > http://www3.sqlite.org/cgi/src/fdiff?sbs=1=445f18999b700d83b83a5d9be00c
> > 596546c21052=90f46af31c92b940fec25b491f39409fd95dcdfa
> >
> > which says in its comment: "Fix a typecast problem in lemon that could
> > cause problems on 64-bit machines."
> >
> > One of my users noticed that on Windows 8.1 x64 with Visual Studio 2013
> > the version of lemon I bundle with my project crashed. With a debugger
> > he found that the problem is caused exactly by the line the above patch
> > changes and found that using '(unsigned long)' in the cast solves the
> > problem. I propose to revert this change. I tested this on Linux (32 and
> > 64 Bit).
>
> I think the code is better as it stands.  And I am unable to recreate the
> problem.
>
> Why do you think (unsigned long) is better?

You are right. The crash was caused by the (unsigned long) cast, and the
(char*) cast fixes the problem. Everything is as it should be.

I was just completely confused by stuff being different on different branches
of my project. Sorry for the noise.

Cheers
Ben



Helmholtz-Zentrum Berlin für Materialien und Energie GmbH

Mitglied der Hermann von Helmholtz-Gemeinschaft Deutscher Forschungszentren e.V.

Aufsichtsrat: Vorsitzender Prof. Dr. Dr. h.c. mult. Joachim Treusch, stv. 
Vorsitzende Dr. Beatrix Vierkorn-Rudolph
Geschäftsführung: Prof. Dr. Anke Rita Kaysser-Pyzalla, Thomas Frederking

Sitz Berlin, AG Charlottenburg, 89 HRB 5583

Postadresse:
Hahn-Meitner-Platz 1
D-14109 Berlin

http://www.helmholtz-berlin.de
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Bug and fix in lemon.c

2014-09-12 Thread Richard Hipp
On Fri, Sep 12, 2014 at 7:23 AM, Benjamin Franksen <
benjamin.frank...@helmholtz-berlin.de> wrote:

> Hi Folks
>
> I am using the lemon parser generator for a different project. It
> appears that an attempt to pro-actively avoid a 64-bit problem in fact
> created one in the first place. I am referring to the following change:
>
>
> http://www3.sqlite.org/cgi/src/fdiff?sbs=1=445f18999b700d83b83a5d9be00c596546c21052=90f46af31c92b940fec25b491f39409fd95dcdfa
>
> which says in its comment: "Fix a typecast problem in lemon that could
> cause problems on 64-bit machines."
>
> One of my users noticed that on Windows 8.1 x64 with Visual Studio 2013
> the version of lemon I bundle with my project crashed. With a debugger
> he found that the problem is caused exactly by the line the above patch
> changes and found that using '(unsigned long)' in the cast solves the
> problem. I propose to revert this change. I tested this on Linux (32 and
> 64 Bit).
>

I think the code is better as it stands.  And I am unable to recreate the
problem.

Why do you think (unsigned long) is better?



>
> Cheers
> Ben
>
> P.S: I am not subscribed to the list.
> --
> "Make it so they have to reboot after every typo." ― Scott Adams
>
>
> 
>
> Helmholtz-Zentrum Berlin für Materialien und Energie GmbH
>
> Mitglied der Hermann von Helmholtz-Gemeinschaft Deutscher
> Forschungszentren e.V.
>
> Aufsichtsrat: Vorsitzender Prof. Dr. Dr. h.c. mult. Joachim Treusch, stv.
> Vorsitzende Dr. Beatrix Vierkorn-Rudolph
> Geschäftsführung: Prof. Dr. Anke Rita Kaysser-Pyzalla, Thomas Frederking
>
> Sitz Berlin, AG Charlottenburg, 89 HRB 5583
>
> Postadresse:
> Hahn-Meitner-Platz 1
> D-14109 Berlin
>
> http://www.helmholtz-berlin.de
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>



-- 
D. Richard Hipp
d...@sqlite.org
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] Bug and fix in lemon.c

2014-09-12 Thread Benjamin Franksen
Hi Folks

I am using the lemon parser generator for a different project. It
appears that an attempt to pro-actively avoid a 64-bit problem in fact
created one in the first place. I am referring to the following change:

http://www3.sqlite.org/cgi/src/fdiff?sbs=1=445f18999b700d83b83a5d9be00c596546c21052=90f46af31c92b940fec25b491f39409fd95dcdfa

which says in its comment: "Fix a typecast problem in lemon that could
cause problems on 64-bit machines."

One of my users noticed that on Windows 8.1 x64 with Visual Studio 2013
the version of lemon I bundle with my project crashed. With a debugger
he found that the problem is caused exactly by the line the above patch
changes and found that using '(unsigned long)' in the cast solves the
problem. I propose to revert this change. I tested this on Linux (32 and
64 Bit).

Cheers
Ben

P.S: I am not subscribed to the list.
--
"Make it so they have to reboot after every typo." ― Scott Adams




Helmholtz-Zentrum Berlin für Materialien und Energie GmbH

Mitglied der Hermann von Helmholtz-Gemeinschaft Deutscher Forschungszentren e.V.

Aufsichtsrat: Vorsitzender Prof. Dr. Dr. h.c. mult. Joachim Treusch, stv. 
Vorsitzende Dr. Beatrix Vierkorn-Rudolph
Geschäftsführung: Prof. Dr. Anke Rita Kaysser-Pyzalla, Thomas Frederking

Sitz Berlin, AG Charlottenburg, 89 HRB 5583

Postadresse:
Hahn-Meitner-Platz 1
D-14109 Berlin

http://www.helmholtz-berlin.de
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users