[LLVMbugs] [Bug 2786] New: in correct branch code produced by code generator, under certain circumstances
bugzilla-daemon at cs.uiuc.edu
bugzilla-daemon at cs.uiuc.edu
Wed Sep 10 16:04:55 PDT 2008
http://llvm.org/bugs/show_bug.cgi?id=2786
Summary: in correct branch code produced by code generator, under
certain circumstances
Product: libraries
Version: 2.3
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: Common Code Generator Code
AssignedTo: unassignedbugs at nondot.org
ReportedBy: lefever at crhc.uiuc.edu
CC: llvmbugs at cs.uiuc.edu
The the machine code generator produces incorrect machine code when processing
the attached bitcode file. The bitcode has a main function that sets up a few
variables and calls strtol___efw______augfun___().
strtol___efw______augfun___() peforms roughly as such:
---------------------------------
1: ...
2: int tmp = (memcmp(...) == 0);
3: ...
4: printf(stderr, "%d\n", tmp);
5: ...
6: if(tmp != 0){
7: printf(stderr, "%d\n", tmp);
8: }
9: ...
10: // later code causes a seg fault
-----------------------------
The problem is that lines 4 and 7 print tmp to be 1; however, we should never
execute line 7, if tmp is 1.
This bug is confirmed on version 2.3 of LLVM. I tried to test with the latest
SVN version of LLVM, but I could not get the gcc frontend to compile on my
x86-64 Linux machine.
I will attach appropriate bugpoint files shortly.
--
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