sunfishcode / c-ward

An implementation of libc written in Rust
Other
187 stars 11 forks source link

Update to origin 0.20.0. #139

Closed sunfishcode closed 2 days ago

sunfishcode commented 1 month ago

Fails with

inlinable function call in a function with debug info must have a !dbg location
  call void @_Unwind_Resume(ptr %197) #15
rustc-LLVM ERROR: Broken module found, compilation aborted!
error: could not compile `unwinding` (lib)

Probably a compiler bug.

bjorn3 commented 1 month ago

Does updating unwinding-rs work?

sunfishcode commented 1 month ago

It's already using unwinding v0.2.2, which is the latest version.

bjorn3 commented 1 month ago

https://github.com/rust-lang/rust/issues/101121 has an identical error message but was supposedly fixed over a year ago already.

sunfishcode commented 1 week ago

With the latest nightly Rust, it now passes on x86-64 and i686, but it still fails on riscv64.

bjorn3 commented 3 days ago

I can't reproduce the aarch64 failure locally.

Edit: I can't reproduce it on x86_64 cross compiling to aarch64, but I can reproduce it on aarch64 natively.

bjorn3 commented 3 days ago

I was able to reproduce crash independently of c-ward, but only when incr comp is disabled. I opened https://github.com/nbdd0121/unwinding/issues/34 to track it on the unwinding side.

sunfishcode commented 2 days ago

Adding these [profile.dev.package.unwinding] workarounds to all users isn't great, but I think it's the best option for now.