[Bug 259799] devel/rust-cbindgen: armv6: build using "make" fails, using "cargo build --release -j 1" works

From: <bugzilla-noreply_at_freebsd.org>
Date: Sat, 27 Nov 2021 03:37:56 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=259799

--- Comment #39 from Mark Millard <marklmi26-fbsd@yahoo.com> ---
(In reply to Mark Millard from comment #36)

The try in comment 36 was under main-CA7 jail. I tried under
the 13_0R-CA7 jail (so: 13.0-RELEASE-p5 world) (without rustc
having been stripped but having no debug information) and the
failure was more like before but it did stop

thread 'rustc' panicked at 'capacity overflow',
library/alloc/src/raw_vec.rs:559:5
stack backtrace:
   0: rust_begin_unwind
   1: core::panicking::panic_fmt
   2: core::panicking::panic
   3: alloc::raw_vec::capacity_overflow
   4: alloc::raw_vec::RawVec<T,A>::reserve::do_reserve_and_handle
   5: std::backtrace::Backtrace::create::{{closure}}
   6: std::backtrace_rs::backtrace::libunwind::trace::trace_fn
   7: _Unwind_Backtrace
   8: std::backtrace::Backtrace::create
   9: std::backtrace::Backtrace::force_capture
  10: <unknown>
  . . .
  42: <unknown>
  43: std::sys::unix::thread::Thread::new::thread_start
  44: <unknown>
  45: pthread_create
  46: pthread_peekjoin_np
  . . .
  91: pthread_peekjoin_np
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose
backtrace.

error: internal compiler error: unexpected panic

note: the compiler unexpectedly panicked. this is a bug.

note: we would appreciate a bug report:
https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md

note: rustc 1.56.0 running on armv7-unknown-freebsd

note: compiler flags: -C embed-bitcode=no -C debuginfo=2 -C linker=cc -C
target-cpu=cortex-a7 -C link-arg=-fstack-protector-strong --crate-type lib

note: some of the compiler flags provided by cargo are hidden

query stack during panic:
#0 [trimmed_def_paths] calculating trimmed def paths
#1 [lint_mod] linting module `file`
#2 [analysis] running analysis passes on this crate
end of query stack
error: could not compile `tempfile`

Caused by:
  process didn't exit successfully: `CARGO=/usr/local/bin/cargo
CARGO_CRATE_NAME=tempfile
CARGO_MANIFEST_DIR=/wrkdirs/usr/ports/devel/rust-cbindgen/work/cbindgen-0.20.0/cargo-crates/tempfile-3.1.0
CARGO_PKG_AUTHORS='Steven Allen <steven@stebalien.com>:The Rust Project
Developers:Ashley Mannix <ashleymannix@live.com.au>:Jason White
<jasonaw0@gmail.com>' CARGO_PKG_DESCRIPTION='A library for managing temporary
files and directories.'
CARGO_PKG_HOMEPAGE='http://stebalien.com/projects/tempfile-rs'
CARGO_PKG_LICENSE='MIT OR Apache-2.0' CARGO_PKG_LICENSE_FILE=''
CARGO_PKG_NAME=tempfile
CARGO_PKG_REPOSITORY='https://github.com/Stebalien/tempfile'
CARGO_PKG_VERSION=3.1.0 CARGO_PKG_VERSION_MAJOR=3 CARGO_PKG_VERSION_MINOR=1
CARGO_PKG_VERSION_PATCH=0 CARGO_PKG_VERSION_PRE=''
LD_LIBRARY_PATH='/wrkdirs/usr/ports/devel/rust-cbindgen/work/target/debug/deps:/usr/local/lib'
/usr/local/bin/rustc --crate-name tempfile --edition=2018
/wrkdirs/usr/ports/devel/rust-cbindgen/work/cbindgen-0.20.0/cargo-crates/tempfile-3.1.0/src/lib.rs
--error-format=json --json=diagnostic-rendered-ansi,artifacts --crate-type lib
--emit=dep-info,metadata,link -C embed-bitcode=no -C debuginfo=2 -C
metadata=8c80968e1c70792f -C extra-filename=-8c80968e1c70792f --out-dir
/wrkdirs/usr/ports/devel/rust-cbindgen/work/target/armv7-unknown-freebsd/debug/deps
--target armv7-unknown-freebsd -C linker=cc -L
dependency=/wrkdirs/usr/ports/devel/rust-cbindgen/work/target/armv7-unknown-freebsd/debug/deps
-L dependency=/wrkdirs/usr/ports/devel/rust-cbindgen/work/target/debug/deps
--extern
cfg_if=/wrkdirs/usr/ports/devel/rust-cbindgen/work/target/armv7-unknown-freebsd/debug/deps/libcfg_if-bcb77f88a4cb1033.rmeta
--extern
libc=/wrkdirs/usr/ports/devel/rust-cbindgen/work/target/armv7-unknown-freebsd/debug/deps/liblibc-9cfeb93970e2f28b.rmeta
--extern
rand=/wrkdirs/usr/ports/devel/rust-cbindgen/work/target/armv7-unknown-freebsd/debug/deps/librand-521a6a5a702772ce.rmeta
--extern
remove_dir_all=/wrkdirs/usr/ports/devel/rust-cbindgen/work/target/armv7-unknown-freebsd/debug/deps/libremove_dir_all-eb5202f50395c473.rmeta
--cap-lints warn -C target-cpu=cortex-a7 -C link-arg=-fstack-protector-strong`
(signal: 5, SIGTRAP: trace/breakpoint trap)
*** Error code 101


Notabily in this context it reported SIGTRAP instead of the SIGSEGV that
main-CA7
reported.

Also notable is that the capacity-overflow happened during the attempt to
do a backtrace that had already been initiated: Nested problems? (Possibly
SIGSEGV was first?)

-- 
You are receiving this mail because:
You are on the CC list for the bug.