Bug 202318 - lang/clang36: FreeBSD 10.2/amd64 + clang 3.6.2 dumps core when building /usr/src/sys/modules/sppp
Summary: lang/clang36: FreeBSD 10.2/amd64 + clang 3.6.2 dumps core when building /usr/...
Status: Closed Overcome By Events
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Only Me
Assignee: Brooks Davis
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-08-14 09:21 UTC by stadtkind2
Modified: 2015-08-28 21:08 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (brooks)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description stadtkind2 2015-08-14 09:21:00 UTC
Hi,

clang 3.6.2 dumps core when building FreeBSD 10.2-REL's /usr/src/sys/modules/sppp

Steps to reproduce:

# pkg install clang36
# echo 'CC=/usr/local/bin/clang36' >> /etc/make.conf

$ cd /usr/src/sys/modules/sppp
$ make obj depend all
...
/usr/local/bin/clang36 -O2 -pipe  -fno-strict-aliasing -Werror -D_KERNEL -DKLD_MODULE -nostdinc   -I. -I@ -I@/contrib/altq -fno-common  -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer  -mno-aes -mno-avx -mcmodel=kernel -mno-red-zone -mno-mmx -mno-sse -msoft-float  -fno-asynchronous-unwind-tables -ffreestanding -fstack-protector -std=iso9899:1999 -Qunused-arguments  -fstack-protector -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes  -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual  -Wundef -Wno-pointer-sign -fformat-extensions  -Wmissing-include-dirs -fdiagnostics-show-option  -Wno-error-tautological-compare -Wno-error-empty-body  -Wno-error-parentheses-equality -Wno-error-unused-function   -c /usr/src/sys/modules/sppp/../../net/if_spppsubr.c -o if_spppsubr.o
Stack dump:
0.      Program arguments: /usr/local/llvm36/bin/clang -cc1 -triple x86_64-portbld-freebsd10.1 -emit-obj -disable-free -disable-llvm-verifier -main-file-name if_spppsubr.c -mrelocation-model static -mthread-model posix -mdisable-fp-elim -relaxed-aliasing -masm-verbose -mconstructor-aliases -mcode-model kernel -target-cpu x86-64 -target-feature -aes -target-feature -avx -target-feature -mmx -target-feature -sse -disable-red-zone -no-implicit-float -target-linker-version 2.17.50 -dwarf-column-info -coverage-file /usr/obj/usr/src/sys/modules/sppp/if_spppsubr.o -nostdsysteminc -nobuiltininc -resource-dir /usr/local/llvm36/bin/../lib/clang/3.6.2 -D _KERNEL -D KLD_MODULE -I . -I @ -I @/contrib/altq -O2 -Werror -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign -Wmissing-include-dirs -Wno-error-tautological-compare -Wno-error-empty-body -Wno-error-parentheses-equality -Wno-error-unused-function -std=iso9899:1999 -fdebug-compilation-dir /usr/obj/usr/src/sys/modules/sppp -ferror-limit 19 -fmessage-length 80 -ffreestanding -fformat-extensions -stack-protector 1 -mstackrealign -fobjc-runtime=gnustep -fno-common -fdiagnostics-show-option -fcolor-diagnostics -vectorize-loops -vectorize-slp -o if_spppsubr.o -x c /usr/src/sys/modules/sppp/../../net/if_spppsubr.c 
1.      /usr/src/sys/modules/sppp/../../net/if_spppsubr.c:5397:30: current parser token ')'
2.      /usr/src/sys/modules/sppp/../../net/if_spppsubr.c:5395:1: parsing function body 'sppp_print_bytes'
3.      /usr/src/sys/modules/sppp/../../net/if_spppsubr.c:5395:1: in compound statement ('{}')
clang: error: unable to execute command: Segmentation fault (core dumped)
clang: error: clang frontend command failed due to signal (use -v to see invocation)
clang version 3.6.2 (tags/RELEASE_362/final)
Target: x86_64-portbld-freebsd10.1
Thread model: posix
clang: note: diagnostic msg: PLEASE submit a bug report to http://llvm.org/bugs/ and include the crash backtrace, preprocessed source, and associated run script.
clang: note: diagnostic msg: 
********************

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

********************
*** Error code 254

Stop.
make: stopped in /usr/src/sys/modules/sppp
Comment 1 Brooks Davis freebsd_committer freebsd_triage 2015-08-26 00:07:55 UTC
This is almost certainly a bug in the upstream compiler.  Please submit a report to the llvm.org bugzilla.

It may be worth checking that the clang in devel/llvm37 has this bug before submitting.
Comment 2 stadtkind2 2015-08-28 21:08:57 UTC
usr/src/sys/modules/sppp builds fine with llvm37