[LLVMbugs] [Bug 9684] New: llvm-gcc and clang both miscompile nedit-5.5/source/regularExp.c at -O2

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Apr 11 20:08:49 PDT 2011


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

           Summary: llvm-gcc and clang both miscompile
                    nedit-5.5/source/regularExp.c at -O2
           Product: new-bugs
           Version: 2.9
          Platform: Macintosh
        OS/Version: MacOS X
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: howarth at nitro.med.uc.edu
                CC: llvmbugs at cs.uiuc.edu


Both llvm-gcc 2.9 and clang 2.9 miscompile nedit-5.5/source/regularExp.c at -O2
on x86_64 darwin. The miscompilation causes nedit to crash as...

Process 3810 launched:
'/opt/local/var/macports/build/_Users_howarth_ports_editors_nedit/work/nedit-5.5/source/nedit'
(x86_64)
UTF8 locale not supported.
(lldb) Process 3810 stopped
* thread #1: tid = 0x2303, 0x00007fff8381a7aa libsystem_kernel.dylib`__kill +
10, stop reason = signal SIGABRT
(lldb) bt
thread #1: tid = 0x2303, stop reason = signal SIGABRT
  frame #0: 0x00007fff8381a7aa libsystem_kernel.dylib`__kill + 10
  frame #1: 0x00007fff826fd9ec libsystem_c.dylib`__abort + 193
  frame #2: 0x00007fff826cf743 libsystem_c.dylib`__chk_fail + 91
  frame #3: 0x00007fff826cf6ba libsystem_c.dylib`__memset_chk + 14
  frame #4: 0x0000000100048ca4 nedit`SetREDefaultWordDelimiters [inlined]
makeDelimiterTable + 24 at regularExp.c:4089
  frame #5: 0x0000000100048c8c nedit`SetREDefaultWordDelimiters + 12 at
regularExp.c:4110
  frame #6: 0x0000000100001dc3 nedit`main + 2355
  frame #7: 0x0000000100001484 nedit`start + 52

Recompiling nedit-5.5/source/regularExp.c with -Os eliminates the crash.

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