Bug 201760 - AARCH64 clang crash building ftpcopy
Summary: AARCH64 clang crash building ftpcopy
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: arm (show other bugs)
Version: CURRENT
Hardware: arm64 Any
: --- Affects Some People
Assignee: freebsd-arm mailing list
URL:
Keywords:
Depends on:
Blocks: 201763
  Show dependency treegraph
 
Reported: 2015-07-22 15:25 UTC by Sean Bruno
Modified: 2015-11-08 08:49 UTC (History)
3 users (show)

See Also:


Attachments
clang crash files (30.50 KB, application/x-tar)
2015-07-22 15:25 UTC, Sean Bruno
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sean Bruno freebsd_committer 2015-07-22 15:25:56 UTC
Created attachment 159065 [details]
clang crash files

Assertion failed: (RegParmMax < 7 && "RegParmMax value is larger than AST can handle"), function getRegParmMax, file /usr/local/poudriere/jails/11aarch64/usr/src/lib/clang/libclangsema/../../../contrib/llvm/tools/clang/include/clang/Basic/TargetInfo.h, line 778.
Stack dump:
0.      Program arguments: /nxb-bin/usr/bin/cc -cc1 -triple aarch64-unknown-freebsd11.0 -emit-obj -disable-free -main-file-name uogetopt.c -mrelocation-model static -mthread-model posix -mdisable-fp-elim -relaxed-aliasing -masm-verbose -mconstructor-aliases -fuse-init-array -target-cpu generic -target-feature +neon -target-abi aapcs -dwarf-column-info -coverage-file /wrkdirs/usr/ports/ftp/ftpcopy/work/web/ftpcopy-0.6.7/compile/uogetopt.c -resource-dir /nxb-bin/usr/bin/../lib/clang/3.6.1 -D PACKAGE_VERSION="ftpcopy-0.6.7" -D PACKAGE="ftpcopy" -D VERSION="0.6.7" -D PACKAGE_CLASS="web" -I . -O2 -fdebug-compilation-dir /wrkdirs/usr/ports/ftp/ftpcopy/work/web/ftpcopy-0.6.7/compile -ferror-limit 19 -fmessage-length 0 -mstackrealign -fallow-half-arguments-and-returns -fno-signed-char -fobjc-runtime=gnustep -fdiagnostics-show-option -vectorize-loops -vectorize-slp -o uogetopt.o -x c uogetopt.c 
1.      uogetopt.c:49:22: current parser token ';'
cc: error: unable to execute command: Abort trap (core dumped)
cc: error: clang frontend command failed due to signal (use -v to see invocation)
FreeBSD clang version 3.6.1 (tags/RELEASE_361/final 237755) 20150525
Target: aarch64-unknown-freebsd11.0
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.
--- auto-have_futimes.h ---
conftest37207.c:6:8: warning: implicit declaration of function 'futimes' is invalid in C99 [-Wimplicit-function-declaration]
  if (!futimes(argv[1],dummy)) return 0;
       ^
1 warning generated.
--- libuotime.a ---
--- uogetopt.o ---
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/uogetopt-08615d.c
cc: note: diagnostic msg: /tmp/uogetopt-08615d.sh
cc: note: diagnostic msg: 

********************
--- libuotime.a ---
./auto-makelib.sh libuotime.a uo_now.o uo_sec702dt.o yyyy_mm_dd.o
--- uogetopt.o ---
*** [uogetopt.o] Error code 254

make[2]: stopped in /wrkdirs/usr/ports/ftp/ftpcopy/work/web/ftpcopy-0.6.7/compile
--- auto-have_utimes.h ---
conftest37176.c:7:2: warning: implicitly declaring library function '_exit' with type 'void (int) __attribute__((noreturn))'
        _exit(0);
        ^
conftest37176.c:7:2: note: include the header <unistd.h> or explicitly provide a declaration for '_exit'
1 warning generated.
--- auto-typesize.stamp ---
rm -f typesize.t
touch auto-typesize.stamp
1 error

make[2]: stopped in /wrkdirs/usr/ports/ftp/ftpcopy/work/web/ftpcopy-0.6.7/compile
*** [all] Error code 1

make[1]: stopped in /wrkdirs/usr/ports/ftp/ftpcopy/work/web/ftpcopy-0.6.7
1 error

make[1]: stopped in /wrkdirs/usr/ports/ftp/ftpcopy/work/web/ftpcopy-0.6.7
===> Compilation failed unexpectedly.
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
the maintainer.
*** Error code 1

Stop.
make: stopped in /usr/ports/ftp/ftpcopy
Comment 1 Matthias Andree freebsd_committer 2015-07-22 19:25:53 UTC
Sean, please reassign to the base system for the version of the OS you are using, and to the "arm" component.
Comment 2 Matthias Andree freebsd_committer 2015-07-22 19:27:07 UTC
This is not a ftpcopy port bug, but a compiler fault.
Comment 3 Ed Maste freebsd_committer 2015-07-24 13:21:23 UTC
The compiler shouldn't crash, but it looks like this may actually be a port bug. regparm is an x86-only attribute, and it sounds like Clang will likely start producing an error when encountered on non-x86.

regparm description (see x86): https://gcc.gnu.org/onlinedocs/gcc/Function-Attributes.html

clang bug: https://llvm.org/bugs/show_bug.cgi?id=24214
Comment 4 Matthias Andree freebsd_committer 2015-07-29 08:57:57 UTC
well... internal compiler errors and abort() aren't good to deal with invalid/unknown attributes.
Comment 5 Ed Maste freebsd_committer 2015-07-29 12:36:12 UTC
> well... internal compiler errors and abort() aren't good to deal with
> invalid/unknown attributes.

Indeed, and that's now fixed upstream and will be in 3.7.
http://llvm.org/viewvc/llvm-project?view=revision&revision=243417
Comment 6 Andrew Turner freebsd_committer 2015-11-08 08:49:58 UTC
Fixed in Clang 3.7