[llvm-bugs] [Bug 43203] New: Crash when using .code32 in assembly with target x86_64-unknown-windows

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Sep 3 04:35:55 PDT 2019


https://bugs.llvm.org/show_bug.cgi?id=43203

            Bug ID: 43203
           Summary: Crash when using .code32 in assembly with target
                    x86_64-unknown-windows
           Product: clang
           Version: 8.0
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: js at alien8.de
                CC: htmldeveloper at gmail.com, llvm-bugs at lists.llvm.org,
                    neeilans at live.com, richard-llvm at metafoo.co.uk

Created attachment 22462
  --> https://bugs.llvm.org/attachment.cgi?id=22462&action=edit
Offending assembly file

I am trying to compile a PE binary on Linux that contains some 32-bit code
(it's an UEFI OS loader). The .S file containing this 32-bit code crashes
clang. See below for reproduction steps and stack dump.

This may be related to https://bugs.llvm.org/show_bug.cgi?id=34752 and
https://bugs.llvm.org/show_bug.cgi?id=8595

Even if the feature is not implemented, I would not expect the compiler to
crash.

% clang-8 --version
clang version 8.0.0 (Fedora 8.0.0-1.fc30)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
 % cat pmjump.S
.code32
 % clang-8 -target x86_64-unknown-windows -m64 -c pmjump.S
Stack dump:
0.      Program arguments: /usr/bin/clang-8 -cc1as -triple
x86_64-unknown-windows-msvc19.11.0 -filetype obj -main-file-name pmjump.S
-target-cpu x86-64 -fdebug-compilation-dir /home/julian/tmp
-dwarf-debug-producer clang version 8.0.0 (Fedora 8.0.0-1.fc30)
-dwarf-version=4 -mrelocation-model pic -mincremental-linker-compatible -o
pmjump.o /tmp/pmjump-07eb43.s
#0 0x00007fa2b6c0906e llvm::sys::PrintStackTrace(llvm::raw_ostream&)
(/lib64/libLLVM-8.so+0xabd06e)
#1 0x00007fa2b6c07014 llvm::sys::RunSignalHandlers()
(/lib64/libLLVM-8.so+0xabb014)
#2 0x00007fa2b6c07195 (/lib64/libLLVM-8.so+0xabb195)
#3 0x00007fa2b4f88f00 __restore_rt (/lib64/libc.so.6+0x37f00)
#4 0x00007fa2b6a3c0aa (/lib64/libLLVM-8.so+0x8f00aa)
#5 0x000055f4f9421370
clang-8: error: unable to execute command: Segmentation fault (core dumped)
clang-8: error: clang integrated assembler command failed due to signal (use -v
to see invocation)
clang version 8.0.0 (Fedora 8.0.0-1.fc30)
Target: x86_64-unknown-windows-msvc
Thread model: posix
InstalledDir: /usr/bin
clang-8: note: diagnostic msg: PLEASE submit a bug report to  and include the
crash backtrace, preprocessed source, and associated run script.
clang-8: note: diagnostic msg:
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang-8: note: diagnostic msg: /tmp/pmjump-753307.S
clang-8: note: diagnostic msg: /tmp/pmjump-753307.sh
clang-8: note: diagnostic msg:

-- 
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/20190903/0b014461/attachment.html>


More information about the llvm-bugs mailing list