[LLVMbugs] [Bug 19763] New: Inline asm with constraint 'i' fails with --fsanitize=undefined

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Fri May 16 06:17:55 PDT 2014


            Bug ID: 19763
           Summary: Inline asm with constraint 'i' fails with
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: kdev at fishzet.co.uk
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Created attachment 12517
  --> http://llvm.org/bugs/attachment.cgi?id=12517&action=edit
Preprocessed source code from Libav which triggers the bug (3x)

% cat min.i
fn1() { __asm__("" ::"r"(0), "i"(0 * 0)); }

% clang -fsanitize=undefined -c -o obj.o min.i 2>&1 | grep -A 2 error
dsputil_mmx.i:1:17: error: invalid operand for inline asm constraint 'i'
fn1() { __asm__("" ::"r"(0), "i"(0 * 0)); }

Without -fsanitize=undefined, the above code compiles. The above code is
generated with creduce from the attached file (dsputil_mmx.i) and the following
creduce script:

% cat bug683libav.sh 
rm -f out.txt *.o
ulimit -t 1

    clang -c -o good.o dsputil_mmx.i &&\
    ! clang -fsanitize=undefined -c -o no.o dsputil_mmx.i > out.txt 2>&1 &&\
    grep "invalid operand for inline asm constraint" out.txt
then exit 0
else exit 1

https://bugzilla.libav.org/show_bug.cgi?id=683 (the original Libav bug)
(the FFmpeg workaround).

% clang --version
Ubuntu clang version 3.5-1ubuntu1 (trunk) (based on LLVM 3.5)
Target: x86_64-pc-linux-gnu
Thread model: posix

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/20140516/5bed173f/attachment.html>

More information about the llvm-bugs mailing list