[LLVMbugs] [Bug 12868] New: clang 3.2 segmentation fault

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Fri May 18 05:44:59 PDT 2012


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

             Bug #: 12868
           Summary: clang 3.2 segmentation fault
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Frontend
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: merkil at savhon.org
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified


Hi !
This simple testcase makes clang as of r157044 segfault :

$ cat file.c
char c;

int func(void)
{
    unsigned ui;

    for(c = -1; c; c++)
        if((ui += c) / (ui /= 2))
            return 0;
}

$ clang/build/Release+Asserts/bin/clang -O1 -w -v file.c
clang version 3.2 (trunk 157044)
Target: x86_64-unknown-linux-gnu
Thread model: posix
 "/home/merkil/clang/build/Release+Asserts/bin/clang" -cc1 -triple
x86_64-unknown-linux-gnu -emit-obj -disable-free -main-file-name file.c
-mrelocation-model static -fmath-errno -masm-verbose -mconstructor-aliases
-munwind-tables -target-cpu x86-64 -target-linker-version 2.22
-momit-leaf-frame-pointer -v -resource-dir
/home/merkil/clang/build/Release+Asserts/bin/../lib/clang/3.2
-fmodule-cache-path /var/tmp/clang-module-cache -internal-isystem
/usr/local/include -internal-isystem
/home/merkil/clang/build/Release+Asserts/bin/../lib/clang/3.2/include
-internal-externc-isystem /usr/include/x86_64-linux-gnu
-internal-externc-isystem /include -internal-externc-isystem /usr/include -O1
-w -fdebug-compilation-dir /home/merkil -ferror-limit 19 -fmessage-length 169
-mstackrealign -fgnu-runtime -fobjc-runtime-has-arc -fobjc-runtime-has-weak
-fobjc-fragile-abi -fdiagnostics-show-option -fcolor-diagnostics -o
/tmp/file-4LTyRo.o -x c file.c
clang -cc1 version 3.2 based upon LLVM 3.2svn default target
x86_64-unknown-linux-gnu
ignoring nonexistent directory "/include"
#include "..." search starts here:
#include <...> search starts here:
 /usr/local/include
 /home/merkil/clang/build/Release+Asserts/bin/../lib/clang/3.2/include
 /usr/include/x86_64-linux-gnu
 /usr/include
End of search list.
clang: error: unable to execute command: Segmentation fault
clang: error: clang frontend command failed due to signal (use -v to see
invocation)
clang: note: diagnostic msg: Please submit a bug report to
http://llvm.org/bugs/ and include command line arguments and all diagnostic
information.
clang: note: diagnostic msg: Preprocessed source(s) and associated run
script(s) are located at:
clang: note: diagnostic msg: /tmp/file-xvszu3.i
clang: note: diagnostic msg: /tmp/file-xvszu3.sh

It fails with GCC 4.6/--enable-optimized and GCC 4.5.3/debug as well.

Hope that is useful to you :-)

-- 
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