Created attachment 184048 [details] ar(1) script while building virtualbox I get: kmk: *** Waiting for unfinished jobs.... kmk: *** [/usr/build/usr/ports/emulators/virtualbox-ose/work/VirtualBox-5.1.22/out/freebsd.amd64/release/obj/RuntimeR3/RuntimeR3.a] Segmentation fault (core dumped) The failing command: @/usr/local/bin/kmk_redirect -rti /usr/build/usr/ports/emulators/virtualbox-ose/work/VirtualBox-5.1.22/out/freebsd.amd64/release/obj/RuntimeR3/RuntimeR3.a.ar-script -- ar -M igorr:~>lldb -c ar.core /usr/bin/ar (lldb) target create "/usr/bin/ar" --core "ar.core" Core file '/usr/home/igorr/ar.core' (x86_64) was loaded. (lldb) bt * thread #1, name = 'ar', stop reason = signal SIGSEGV * frame #0: 0x00000000004a9d90 ar`memchr + 16 frame #1: 0x0000000000445959 ar`strstr + 1081 frame #2: 0x000000000040662b ar`archive_write_ar_header + 2075 frame #3: 0x0000000000409a13 ar`_archive_write_header + 259 frame #4: ar`write_archive [inlined] write_objs(bsdar=<unavailable>) at write.c:717 frame #5: ar`write_archive(bsdar=0x00007fffffffe7f0, mode=<unavailable>) at write.c:535 frame #6: ar`yyparse [inlined] arscp_addmod(list=0x0000000800d65010) at acpyacc.y:382 frame #7: ar`yyparse at acpyacc.y:170 frame #8: ar`ar_mode_script(ar=<unavailable>) at acpyacc.y:653 frame #9: ar`main(argc=0, argv=0x00007fffffffe920) at ar.c:310 frame #10: 0x000000000040035f ar`_start + 383 (lldb) I have attached RuntimeBldProg.a.ar-script
Additional info: FreeBSD igorr 12.0-CURRENT FreeBSD 12.0-CURRENT #0 d1caaa93000(master): Mon Jul 3 19:54:58 MSK 2017 igorr@igorr:/usr/obj/usr/src/sys/IGORR amd64
ar(1) from 11-STABLE allowed me build virtualbox-ose
Just as another data point, I'm seeing this as well, on r320472.
Proposed fix in https://reviews.freebsd.org/D11687
With patch I can build VirtualBox without errors.
Fix committed in r321674 https://reviews.freebsd.org/rS321674
A commit references this bug: Author: mm Date: Fri Aug 4 23:34:25 UTC 2017 New revision: 322071 URL: https://svnweb.freebsd.org/changeset/base/322071 Log: MFH r321674: Sync libarchive with vendor. Relevant vendor changes: PR #926: ensure ar strtab is null terminated PR: 220462 Changes: _U stable/11/ stable/11/contrib/libarchive/libarchive/archive_cryptor_private.h stable/11/contrib/libarchive/libarchive/archive_write_set_format_ar.c
A commit references this bug: Author: mm Date: Fri Aug 4 23:34:40 UTC 2017 New revision: 322072 URL: https://svnweb.freebsd.org/changeset/base/322072 Log: MFH r321674: Sync libarchive with vendor. Relevant vendor changes: PR #926: ensure ar strtab is null terminated PR: 220462 Changes: _U stable/10/ stable/10/contrib/libarchive/libarchive/archive_cryptor_private.h stable/10/contrib/libarchive/libarchive/archive_write_set_format_ar.c
Fixed in r321674 and has now been merged to stable/11 and stable/10 (although the bug would not be experienced on other than -current).