[llvm-bugs] [Bug 34075] New: clang segfaults when building some c files with wasm backend

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Aug 4 13:33:46 PDT 2017


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

            Bug ID: 34075
           Summary: clang segfaults when building some c files with wasm
                    backend
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Backend: WebAssembly
          Assignee: unassignedbugs at nondot.org
          Reporter: mvogelsang at rocketmail.com
                CC: llvm-bugs at lists.llvm.org

Created attachment 18908
  --> https://bugs.llvm.org/attachment.cgi?id=18908&action=edit
File the message told me to include

#0 0x0000000001e33d6a llvm::sys::PrintStackTrace(llvm::raw_ostream&)
(/nix/store/bbkn1122s3ndcf9z30zf286jvm27qrxi-clang/bin/clang-6.0+0x1e33d6a)
#1 0x0000000001e31f1e llvm::sys::RunSignalHandlers()
(/nix/store/bbkn1122s3ndcf9z30zf286jvm27qrxi-clang/bin/clang-6.0+0x1e31f1e)
#2 0x0000000001e3206c SignalHandler(int)
(/nix/store/bbkn1122s3ndcf9z30zf286jvm27qrxi-clang/bin/clang-6.0+0x1e3206c)
#3 0x00007f4a6e43b840 __restore_rt
(/nix/store/f111ij1fc83965m48bf2zqgiaq88fqv5-glibc-2.25/lib/libpthread.so.0+0x11840)
#4 0x0000000001b87ec4 llvm::MCAssembler::registerSymbol(llvm::MCSymbol const&,
bool*)
(/nix/store/bbkn1122s3ndcf9z30zf286jvm27qrxi-clang/bin/clang-6.0+0x1b87ec4)
#5 0x0000000001bb84ee llvm::MCWasmStreamer::EmitWeakReference(llvm::MCSymbol*,
llvm::MCSymbol const*)
(/nix/store/bbkn1122s3ndcf9z30zf286jvm27qrxi-clang/bin/clang-6.0+0x1bb84ee)
#6 0x00000000040d5c7b _fini
(/nix/store/bbkn1122s3ndcf9z30zf286jvm27qrxi-clang/bin/clang-6.0+0x40d5c7b)
Stack dump:
0.      Program arguments:
/nix/store/bbkn1122s3ndcf9z30zf286jvm27qrxi-clang/bin/clang-6.0 -cc1 -triple
wasm32-unknown-unknown-wasm -emit-obj -disable-free -disable-llvm-verifier
-discard-value-names -main-file-name tmp.c -mrelocation-model static
-mthread-model posix -masm-verbose -mconstructor-aliases -fuse-init-array
-target-cpu generic -fvisibility hidden -momit-leaf-frame-pointer
-dwarf-column-info -debugger-tuning=gdb -ffunction-sections -fdata-sections
-coverage-notes-file
/home/nox/Documents/ghc/includes/dist-derivedconstants/header/tmp.gcno
-nostdsysteminc -nobuiltininc -resource-dir
/nix/store/bbkn1122s3ndcf9z30zf286jvm27qrxi-clang/lib/clang/6.0.0 -idirafter
/nix/store/djszqfrlmxj8gbp0q3p9s9ihbdz0q3gw-musl-wasm32-unknown-unknown-wasm/include
-idirafter
/nix/store/bbkn1122s3ndcf9z30zf286jvm27qrxi-clang/lib/gcc/*/*/include-fixed
-isystem /nix/store/ilaj538k2z7bqvwby699z2r2hwjajmzv-llvm/include -isystem
/nix/store/c24pf8amzw30zs34l13agxdqqv2hfjv5-ncurses-6.0-dev/include -isystem
/nix/store/aph8ialplvlnijrk1gmz18fxwbljz4lp-ncurses-6.0-wasm32-unknown-unknown-wasm-dev/include
-D USE_MINIINTERPRETER -I includes -I includes/dist -I
includes/dist-derivedconstants/header -I includes/dist-ghcconstants/header -I
rts -D NOSMP -D _FORTIFY_SOURCE=2 -O2 -Wall -Wno-unknown-pragmas -Wformat
-Wformat-security -Werror=format-security -fdebug-compilation-dir
/home/nox/Documents/ghc -ferror-limit 19 -fmessage-length 271 -fwrapv
-stack-protector 2 -stack-protector-buffer-size 4 -fobjc-runtime=gnustep
-fdiagnostics-show-option -fcolor-diagnostics -vectorize-loops -vectorize-slp
-o includes/dist-derivedconstants/header/tmp.o -x c
includes/dist-derivedconstants/header/tmp.c 
1.      <eof> parser at end of file
2.      Code generation
clang-6.0: error: unable to execute command: Segmentation fault
clang-6.0: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 6.0.0 
Target: wasm32-unknown-unknown-wasm
Thread model: posix
InstalledDir: /nix/store/bbkn1122s3ndcf9z30zf286jvm27qrxi-clang/bin
clang-6.0: note: diagnostic msg: PLEASE submit a bug report to  and include the
crash backtrace, preprocessed source, and associated run script.
clang-6.0: note: diagnostic msg: 
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang-6.0: note: diagnostic msg: /run/user/1000/tmp-9f0455.c
clang-6.0: note: diagnostic msg: /run/user/1000/tmp-9f0455.sh
clang-6.0: note: diagnostic msg: 

********************
Executing
"/nix/store/dw234j7rigkn038r67lx0nbgbb56x60d-wasm32-unknown-unknown-wasm-clang-cross-wrapper/bin/wasm32-unknown-unknown-wasm-cc"
failed
compiler/ghc.mk:592: compiler/stage1/build/.depend-v.haskell: No such file or
directory
make[1]: *** [includes/ghc.mk:193:
includes/dist-derivedconstants/header/DerivedConstants.h] Error 1
make: *** [Makefile:125: all] Error 2

-- 
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/20170804/fd2559dc/attachment-0001.html>


More information about the llvm-bugs mailing list