[Bug 205934] clang crashes in configure test with #pragma weak

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Tue Jan 5 20:12:12 UTC 2016


            Bug ID: 205934
           Summary: clang crashes in configure test with #pragma weak
           Product: Base System
           Version: 10.2-RELEASE
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: bin
          Assignee: freebsd-bugs at FreeBSD.org
          Reporter: fuz at fuz.su

The following very short C program triggers a bug in /usr/bin/cc (Clang 3.4.1)
on amd64 FreeBSD 10.2-RELEASE:

    extern int test2();
    #pragma weak test2 = test1
    int test1() {return 0;}
    int main() {
    return test2();
    ; return 0; }

This program is used as a configure test in the Schily utilities, it's supposed
to test if the compiler correctly supports SysV #pragma weak, though it's not
supposed to induce a compiler crash. The output of /usr/bin/cc is:

    Stack dump:
    0.  Program arguments: /usr/bin/cc -cc1 -triple x86_64-unknown-freebsd10.2
-emit-obj -mrelax-all -disable-free -disable-llvm-verifier -main-file-name
clang-bug.c -mrelocation-model static -mdisable-fp-elim -masm-verbose
-mconstructor-aliases -munwind-tables -target-cpu x86-64 -coverage-file
/tmp/clang-bug.o -resource-dir /usr/bin/../lib/clang/3.4.1
-fdebug-compilation-dir /tmp -ferror-limit 19 -fmessage-length 0 -mstackrealign
-fobjc-runtime=gnustep -fdiagnostics-show-option -vectorize-slp -o clang-bug.o
-x c clang-bug.c 
    1.  clang-bug.c:5:14: current parser token ')'
    2.  clang-bug.c:4:12: parsing function body 'main'
    3.  clang-bug.c:4:12: in compound statement ('{}')
    cc: error: unable to execute command: Segmentation fault (core dumped)
    cc: error: clang frontend command failed due to signal (use -v to see
    FreeBSD clang version 3.4.1 (tags/RELEASE_34/dot1-final 208032) 20140512
    Target: x86_64-unknown-freebsd10.2
    Thread model: posix
    cc: note: diagnostic msg: PLEASE submit a bug report to
https://bugs.freebsd.org/submit/ and include the crash backtrace, preprocessed
source, and associated run script.
    cc: note: diagnostic msg: 

    Preprocessed source(s) and associated run script(s) are located at:
    cc: note: diagnostic msg: /tmp/clang-bug-60a5bb.c
    cc: note: diagnostic msg: /tmp/clang-bug-60a5bb.sh
    cc: note: diagnostic msg: 


You are receiving this mail because:
You are the assignee for the bug.

More information about the freebsd-bugs mailing list