[LLVMbugs] [Bug 17693] New: multiplying long long with fsanitize=integer fails with undefined reference to __mulodi4

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Fri Oct 25 09:46:57 PDT 2013


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

            Bug ID: 17693
           Summary: multiplying long long with fsanitize=integer fails
                    with undefined reference to __mulodi4
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: ebacon at shaw.ca
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Multiplying two long long integers fails when using -fsanitze=integer:

$ cat tst.c 
#include <stdlib.h>
int main(int argc, char **argv)
{
    long long x = atoi(argv[1]);
    long long y = atoi(argv[2]);
    long long z = x * y;

    return 0;
}
$ clang --version
clang version 3.4 (trunk 193413)
Target: i386-pc-linux-gnu
Thread model: posix
$ clang -fsanitize=integer tst.c
/tmp/tst-f4b367.o: In function `main':
tst.c:(.text+0x82): undefined reference to `__mulodi4'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
$ clang tst.c
$

This works on x86_64, though, but not when using -m32:

x86-64 $ clang --version
clang version 3.4 (trunk 193417)
Target: x86_64-unknown-linux-gnu
Thread model: posix
x86-64 $ clang -fsanitize=integer -m32 tst.c
/tmp/tst-723c9c.o: In function `main':
tst.c:(.text+0x82): undefined reference to `__mulodi4'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
x86-64 $ clang -fsanitize=integer tst.c
x86-64 $ clang  -m32 tst.c
x86-64 $ 

Perhaps related to http://llvm.org/bugs/show_bug.cgi?id=14469 ?

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20131025/fac743d2/attachment.html>


More information about the llvm-bugs mailing list