Bug 196412

Summary: [arm] clang3.5 crashes building audio/libmad
Product: Base System Reporter: Sean Bruno <sbruno>
Component: armAssignee: freebsd-arm (Nobody) <freebsd-arm>
Status: Closed FIXED    
Severity: Affects Some People CC: Andrew, dim, emaste
Priority: ---    
Version: CURRENT   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
assembler files from failed build
none
assembler files from failed build
none
shell script for assembler file
none
shell script for assembler file
none
Minimised file showing the crash none

Description Sean Bruno freebsd_committer freebsd_triage 2015-01-01 04:08:48 UTC
root@11-armv6-11-armv6-ports:/wrkdirs/usr/ports/audio/libmad/work/libmad-0.15.1b # make
/nxb-bin/usr/bin/make  all-recursive
/bin/sh ./libtool --mode=compile /nxb-bin/usr/bin/cc   -O -pipe  -fno-strict-aliasing -c -o imdct_l_arm.lo imdct_l_arm.S
 /nxb-bin/usr/bin/cc -O -pipe -fno-strict-aliasing -c imdct_l_arm.S  -fPIC -DPIC -o .libs/imdct_l_arm.o
Unimplemented
UNREACHABLE executed at /usr/local/poudriere/jails/11-armv6/usr/src/lib/clang/libllvmarmdesc/../../../contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMELFObjectWriter.cpp:84!
Stack dump:
0.      Program arguments: /nxb-bin/usr/bin/cc -cc1as -triple armv6--freebsd11.0-gnueabi -filetype obj -main-file-name imdct_l_arm.S -target-cpu arm1176jzf-s -target-feature -neon -target-feature -crypto -fdebug-compilation-dir /wrkdirs/usr/ports/audio/libmad/work/libmad-0.15.1b -dwarf-debug-producer FreeBSD clang version 3.5.0 (tags/RELEASE_350/final 216957) 20141124 -o .libs/imdct_l_arm.o /tmp/imdct_l_arm-578a03.s 
1.      Program arguments: -triple armv6--freebsd11.0-gnueabi -filetype obj -main-file-name imdct_l_arm.S -target-cpu arm1176jzf-s -target-feature -neon -target-feature -crypto -fdebug-compilation-dir /wrkdirs/usr/ports/audio/libmad/work/libmad-0.15.1b -dwarf-debug-producer FreeBSD clang version 3.5.0 (tags/RELEASE_350/final 216957) 20141124 -o .libs/imdct_l_arm.o /tmp/imdct_l_arm-578a03.s 
cc: error: unable to execute command: Abort trap (core dumped)
cc: error: clang integrated assembler command failed due to signal (use -v to see invocation)
FreeBSD clang version 3.5.0 (tags/RELEASE_350/final 216957) 20141124
Target: armv6--freebsd11.0-gnueabi
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: 
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
cc: note: diagnostic msg: /tmp/imdct_l_arm-3ad840.S
cc: note: diagnostic msg: /tmp/imdct_l_arm-3ad840.sh
cc: note: diagnostic msg: 

********************
*** Error code 1

Stop.
make[2]: stopped in /wrkdirs/usr/ports/audio/libmad/work/libmad-0.15.1b
*** Error code 1

Stop.
make[1]: stopped in /wrkdirs/usr/ports/audio/libmad/work/libmad-0.15.1b
*** Error code 1

Stop.
make: stopped in /wrkdirs/usr/ports/audio/libmad/work/libmad-0.15.1b
Comment 1 Sean Bruno freebsd_committer freebsd_triage 2015-01-01 04:09:12 UTC
Created attachment 151173 [details]
assembler files from failed build
Comment 2 Sean Bruno freebsd_committer freebsd_triage 2015-01-01 04:09:29 UTC
Created attachment 151174 [details]
assembler files from failed build
Comment 3 Sean Bruno freebsd_committer freebsd_triage 2015-01-01 04:10:00 UTC
Created attachment 151175 [details]
shell script for assembler file
Comment 4 Sean Bruno freebsd_committer freebsd_triage 2015-01-01 04:10:16 UTC
Created attachment 151176 [details]
shell script for assembler file
Comment 5 Andrew Turner freebsd_committer freebsd_triage 2015-01-01 12:12:53 UTC
Created attachment 151188 [details]
Minimised file showing the crash

I've created a minimised file showing the crash. It looks like the fixup llvm is not handling is ARM::fixup_arm_adr_pcrel_12 however I'm not sure what the correct fix would be.