bug-bison
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: bug in bison-1.875


From: Martin MOKREJŠ
Subject: Re: bug in bison-1.875
Date: Mon, 14 Apr 2003 16:37:39 +0200 (CEST)

Hi Paul,
  here're some answers from DEC/COMPAQ/HP engineers. The compiler shouldn't
crash in future on _Bool's, but it still won't be supported. I'm not a C
programmer, so I cannot comment on this. To me it's not clear now what to do
actually. Unfortunately, I do not have a direct contact to the developers, only
via customer support. Feel free to bug them on this if you have any questions.
Thanks.
-- 
Martin Mokrejs <address@hidden>, <address@hidden>
PGP5.0i key is at http://www.natur.cuni.cz/~mmokrejs
MIPS / Institute for Bioinformatics <http://mips.gsf.de>
GSF - National Research Center for Environment and Health
Ingolstaedter Landstrasse 1, D-85764 Neuherberg, Germany
tel.: +49-89-3187 3683 , fax: +49-89-3187 3585

---------- Forwarded message ----------
From: "Belgardt, Wolfgang" <address@hidden>
To: Martin MOKREJŠ <address@hidden>
Date: Mon, 14 Apr 2003 16:26:40 +0200
Subject: RE: Bug in C compiler Compiler Bug for Case   3411658RE

Dear Mr Mokreis,

I have send your compiler log file to c++ engineering.
Here is the answer.

        We understand this is a compiler problem.  I do not know when
        we will have a fix.

        From what I can tell, the customer is running a configuration script to
        see if an implementation supports the boolean data type defined in C99.

        Versions of Compaq C prior to V6.5 did not support this, but V6.5 does
        have some support.  However, we do not support the initialization of 
_Bool's
        to an address.  So the line in his program:

        bool e = &s;

        Should generate a compiler error instead of a crash.

            Support for a conversion of an address to a bool is "undefined 
behavior" according to
        the C99 standard.  So, it's valid for out compiler to generate an error 
for this case.

        I would suggest the customer modify the configuration script so that 
the line in question
        is replaced with any other line that will generate a error.


        I find it surprising the Bison would rely on the ability to initialize 
a static _Bool with
        the address of an object.

        I hope this helps,





Mit freundlichen Grüssen / Kind Regards


Wolfgang Belgardt
Customer Support Consultant

Hewlett-Packard GmbH
Customer Support
Bonsiepen 5
D-45136 Essen
Phone: ++49 (0) 201 2663 258
Fax:             ++49 (0) 201 2663 200
mobil:    +49 (0171 3357 256)
E-mail:  address@hidden
http://www.hp.com/de
__________________________________________________________________________________
Hewlett-Packard GmbH
Geschäftsführer: Jörg Menno Harms (Vorsitzender), Jürgen Banhardt, Wolfram 
Fischer,
 Rainer Kaczmarczyk, Bärbel Schmidt, Fritz Schuller, Regine Stachelhaus
Vorsitzender des Aufsichtsrats: Heribert Schmitz
Sitz der Gesellschaft: Böblingen, Amtsgericht Böblingen HRB 4081

-----Original Message-----
From: Martin MOKREJŠ [mailto:address@hidden
Sent: Friday, April 11, 2003 11:15
To: Belgardt, Wolfgang
Subject: RE: Bug in C compiler Compiler Bug for Case 3411658RE

Dear Mr. Belgardt,
  the former was the testcase how to reproduce the crash. But could the
developers tell me what is wrong in the configure code of GNU Bison?
The following snippet I see in config.log file after configure was run:

configure:4876: checking for stdbool.h that conforms to C99
configure:4930: cc -c -O2 -arch ev56 -I/software/@sys/usr/include 
-I/usr/local/include -I/usr/local/openssl/include conftest.
c >&5
cc: Error: configure, line 4938: Bug found in compiler: 
generate_address_constant : Unexpected opcode. (compilerbug)
          bool e = &s;
-------------------^
Internal compiler error detected at line 1512 in file 
/usr/proj/decc2/ccdtk-v4-2/src/me_gemc/initgen.c.
cc: Fatal: A memory access violation (bus error or segmentation fault)
has occurred.  Please submit a problem report.
configure:4933: $? = 1
configure: failed program was:
| #line 4881 "configure"
| /* confdefs.h.  */
|
| #define PACKAGE_NAME "GNU Bison"
| #define PACKAGE_TARNAME "bison"
| #define PACKAGE_VERSION "1.875a"
| #define PACKAGE_STRING "GNU Bison 1.875a"
| #define PACKAGE_BUGREPORT "address@hidden"
| #define PACKAGE "bison"
| #define VERSION "1.875a"
| #define _GNU_SOURCE 1
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define YYTEXT_POINTER 1
| #define M4 "/software/@sys/usr/bin/m4"
| #define STDC_HEADERS 1
| #define HAVE_CTYPE_H 1
| #define HAVE_LOCALE_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_UNISTD_H 1
| /* end confdefs.h.  */
|
|         #include <stdbool.h>
|         #ifndef bool
|          "error: bool is not defined"
|         #endif
|         #ifndef false
|          "error: false is not defined"
|         #endif
|         #if false
|          "error: false is not 0"
|         #endif
|         #ifndef true
|          "error: false is not defined"
|         #endif
|         #if true != 1
|          "error: true is not 1"
|         #endif
|         #ifndef __bool_true_false_are_defined
|          "error: __bool_true_false_are_defined is not defined"
|         #endif
|
|         struct s { _Bool s: 1; _Bool t; } s;
|
|         char a[true == 1 ? 1 : -1];
|         char b[false == 0 ? 1 : -1];
|         char c[__bool_true_false_are_defined == 1 ? 1 : -1];
|         char d[(bool) -0.5 == true ? 1 : -1];
|         bool e = &s;
|         char f[(_Bool) -0.0 == false ? 1 : -1];
|         char g[true];
|         char h[sizeof (_Bool)];
|         char i[sizeof s.t];
|
| int
| main ()
| {
|  return !a + !b + !c + !d + !e + !f + !g + !h + !i;
|   ;
|   return 0;
| }
configure:4950: result: no

They can get the code form ftp://alpha.gnu.org/pub/gnu/bison

I believe this code is NOT wrong. And therefore, I'd like to get the *fixed*
version of the compiler and see that this code gets compiled or explanation
what's wrong with it. I'm sure bison developers will apreciate that too. ;)

Many thanks
Martin

On Thu, 10 Apr 2003, Belgardt, Wolfgang wrote:

> Hello Mr.Morkejs,
>
> This is for Mr. Bhanu and  his case 3411658RE
>
> I have send the contents of your Email to c++ engineering.
> Engineering says:
>
> We acknowledge that this is a compiler problem.  We have entered
>       a problem report for it in our internal bug tracking system.
>
>       While the compiler should not crash, the input program is not valid.
>       One can not assign an address to a Boolean.  The compiler should
>       have generated an error for this program.
>
>       So, please let the customer know that we are sorry for the compiler 
> crash.
>       The solution is to modify the program so that address types are stored
>       in pointer variables.
>
>       I hope this will satisfy you.
>
> Can you give me please a short feedback , whether I can close the case?
>
>
>
> Mit feundlichen Grüssen/ Kind Regards
>
>
> Wolfgang Belgardt
> Customer Support Consultant
>
> Hewlett-Packard GmbH
> Customer Support
> Bonsiepen 5
> D-45136 Essen
> Phone:        ++49 (0) 201 2663 258
> Fax:          ++49 (0) 201 2663 200
> mobil:          +49 (0171 3357 256)
> E-mail:        address@hidden
> http://www.hp.com/de
>
> Hewlett-Packard GmbH
> Geschäftsführer: Jörg Menno Harms (Vorsitzender), Jürgen Banhardt, Wolfram 
> Fischer,
>  Rainer Kaczmarczyk, Bärbel Schmidt, Fritz Schuller, Regine Stachelhaus
> Vorsitzender des Aufsichtsrats: Heribert Schmitz
> Sitz der Gesellschaft: Böblingen, Amtsgericht Böblingen HRB 4081
>
> -----Original Message-----
> From: Martin MOKREJŠ [mailto:address@hidden
> Sent: Thursday, April 10, 2003 16:20
> To: Belgardt, Wolfgang
> Subject: RE: Bug in C compiler
>
> Here is the original thread under which I posted this bug to cxx list.
> Below is actually one of the responses in that thread, I believe from Ken 
> Benneth too.
> I believe the very same bug got posted to the C bug database as cxxc_bugs9889,
> but I don't have access to that database so I cannot say exactly what's in.
> If you query the archive of the cxx list, you will find the original post, 
> where
> this happened during GNU bison compilation(actually during the configure test
> if I remember right).
>
> Hth
> martin
>
>
> From: address@hidden
> To: address@hidden
> Date: Mon, 3 Mar 2003 13:30:44 -0500
> Subject: Re: CPP#5815: Subj: RE: cc version 6.5-207 bug on Tru64Unix 5.1A
>
> --------------------------------------------------------------------------------
> Martin,
>
> Thanks for the bug report. It reduces down to the following.
>
> Compaq C/C++ Team
>
> cxxosf.zko.dec.com> envir
> alphaosf cdev dbg bl48
>
> cxxosf.zko.dec.com> $RTS_COMPILER -c t2.c
> cc: Error: t2.c, line 2: Bug found in compiler: generate_address_constant :
> Unexpected opcode. (compilerbug)
> _Bool  e = &i;
> -----------^
> Internal compiler error detected at line 1512 in file
> /usr/proj/decc2/mainline/src/me_gemc/initgen.c.
> cc: Fatal: A memory access violation (bus error or segmentation fault)
> has occurred.  Please submit a problem report.
>
>
> cxxosf.zko.dec.com> cat t2.c
> int i;
> _Bool  e = &i;
>
>
>
> Please send all Compaq C/C++ Support requests to address@hidden
> Reply to this message for further correspondence regarding THIS support
> request.  Thank you for choosing Compaq C/C++.
>
>
>
> On Thu, 10 Apr 2003, Belgardt, Wolfgang wrote:
>
> > Hello Mr. Mokrejs,
> >
> > I  talk wit Mr. Bhanu and I have him requested to send me a  detailed 
> > description and if possible a log file which contained error messages.
> >
> > Can you please send me this?
> >
> >
> > Mit freundlichen Grüssen
> >
> >
> > Wolfgang Belgardt
> > Customer Support Consultant
> >
> > Hewlett-Packard GmbH
> > Customer Support
> > Bonsiepen 5
> > D-45136 Essen
> > Phone: ++49 (0) 201 2663 258
> > Fax:           ++49 (0) 201 2663 200
> > mobil:          +49 (0171 3357 256)
> > E-mail:  address@hidden
> > http://www.hp.com/de
> > __________________________________________________________________________________
> > Hewlett-Packard GmbH
> > Geschäftsführer: Jörg Menno Harms (Vorsitzender), Jürgen Banhardt, Wolfram 
> > Fischer,
> >  Rainer Kaczmarczyk, Bärbel Schmidt, Fritz Schuller, Regine Stachelhaus
> > Vorsitzender des Aufsichtsrats: Heribert Schmitz
> > Sitz der Gesellschaft: Böblingen, Amtsgericht Böblingen HRB 4081
> >
> > -----Original Message-----
> > From: Martin MOKREJŠ [mailto:address@hidden
> > Sent: Thursday, April 10, 2003 12:22
> > To: Belgardt, Wolfgang
> > Subject: Re: Bug in C compiler
> >
> > Dear Mr. Belhardt,
> >   I'm responding in behalf of Yogesh Bhanu, our sysadmin. I've reported the 
> > bug
> > to CXX developers as those were the only ones whom I could reach via 
> > internet.
> > Here originates the misunderstanding: the bug found is in present in DEC C
> > compiler, Ken Benneth from CXX list replied:
> >
> > This bug report is in the C bug database as cxxc_bugs9889. It is marked
> > to be fixed in the next release of the compiler. I do not have any other
> > information. I've added you email to the problem report.
> > Ken
> >
> > However, the bug can be reproduced for example when compiling GNU bison 
> > program.
> > We are highly interrested in getting the fix, as supposedly the same bug 
> > we've
> > hit several times. It was nicely repeatable with publicly available GNU 
> > bison,
> > so that's the reason why it was reported as such a bug.
> >
> > In current situation, we cannot even confirm that the bug was really fixed!
> > Please do not hesistate me to phone if you have any further questions.
> >
> > > Hello Mr. Bhanu,
> > >
> > > I can't find a solution at this moment. All information are referenced
> > > to the next release.
> > > Well, I have send a Email  to the c++ engineers and ask they , when you
> > > can received a solution for this problem.
> > > When  I do have a new information,  I will send a Email  to you.
> > >
> > > I hope that's ok
> > >
> > >
> > >Best Regards/
> > >Mit freundlichen Grüssen
> >
> >
> > $ cc -V
> > Compaq C V6.5-207 (dtk) on Compaq Tru64 UNIX V5.1A (Rev. 1885)
> > Compiler Driver V6.5-207 (dtk) (dtk) cc Driver
> > $
> >
> > Yours,
> > --
> > Martin Mokrejs <address@hidden>, <address@hidden>
> > PGP5.0i key is at http://www.natur.cuni.cz/~mmokrejs
> > MIPS / Institute for Bioinformatics <http://mips.gsf.de>
> > GSF - National Research Center for Environment and Health
> > Ingolstaedter Landstrasse 1, D-85764 Neuherberg, Germany
> > tel.: +49-89-3187 3683 , fax: +49-89-3187 3585
> >
>
> --
> Martin Mokrejs <address@hidden>, <address@hidden>
> PGP5.0i key is at http://www.natur.cuni.cz/~mmokrejs
> MIPS / Institute for Bioinformatics <http://mips.gsf.de>
> GSF - National Research Center for Environment and Health
> Ingolstaedter Landstrasse 1, D-85764 Neuherberg, Germany
> tel.: +49-89-3187 3683 , fax: +49-89-3187 3585
>

--
Martin Mokrejs <address@hidden>, <address@hidden>
PGP5.0i key is at http://www.natur.cuni.cz/~mmokrejs
MIPS / Institute for Bioinformatics <http://mips.gsf.de>
GSF - National Research Center for Environment and Health
Ingolstaedter Landstrasse 1, D-85764 Neuherberg, Germany
tel.: +49-89-3187 3683 , fax: +49-89-3187 3585




reply via email to

[Prev in Thread] Current Thread [Next in Thread]