[LLVMbugs] [Bug 4326] New: Crash when initializing variable with structure offset

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Thu Jun 4 12:24:58 PDT 2009


http://llvm.org/bugs/show_bug.cgi?id=4326

           Summary: Crash when initializing variable with structure offset
           Product: clang
           Version: unspecified
          Platform: PC
        OS/Version: FreeBSD
            Status: NEW
          Severity: normal
          Priority: P2
         Component: parser
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: ed at 80386.nl
                CC: llvmbugs at cs.uiuc.edu
            Blocks: 3696


This code causes Clang to crash without any message:

struct f {
        int a;
};

int arr = ((void *)&(((struct f *)0)->a)) - (void *)0;

$ make llvm-crash
cc -O2 -pipe -fno-strict-aliasing  llvm-crash.c  -o llvm-crash
Stack dump:
0.      Program arguments: /usr/bin/../libexec/clang-cc -triple
x86_64-undermydesk-freebsd8.0 -S -disable-free -main-file-name llvm-crash.c
--relocation-model static --disable-fp-elim --unwind-tables=1 --mcpu=x86-64
--fmath-errno=1 -O2 -fdiagnostics-show-option -o /tmp/cc-sNsmLz.s -x c
llvm-crash.c 
1.      llvm-crash.c:5:54: current parser token ';'
*** Error code 248

Stop in /home/ed.


-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list