You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A recent change to rustc (rust-lang/rust#74990) changed the behavior of unwinding from a Rust function across an extern C ABI change. Now, that will cause an abort. This is causing Mockall's CI tests to fail. The possible solutions are either:
Require users to specify extern C-unwind instead. This is annoying for users, and it might not be correct for all non-mock functions.
Automatically define the mock functions as C-unwind. This is much better. However, it causes two new problems:
A function pointer to the original C function will now have a different type from a function pointer to the mock function, because the ABI is part of the function pointer's type.
C-unwind does not yet work for variadic functions.
Somehow figure out how to make Mockall work with panic=abort. It's not a problem, as long as no tests are should_panic and no tests ever fail 😉 .
The text was updated successfully, but these errors were encountered:
Begining within Rust 1.81
(rust-lang/rust#74990) Rust will abort when
attempting to unwind a panic across an "extern C" boundary. Previously
it was technically UB, but it worked and Mockall relied on it. Now,
unwinding across such a boundary requires the "extern C-unwind" ABI.
Use that ABI in the generated code.
However, don't use that ABI when mocking a C variadic function. That
doesn't work, due to rust-lang/rust#126836 .
Fixes#584
A recent change to rustc (rust-lang/rust#74990) changed the behavior of unwinding from a Rust function across an
extern C
ABI change. Now, that will cause an abort. This is causing Mockall's CI tests to fail. The possible solutions are either:extern C-unwind
instead. This is annoying for users, and it might not be correct for all non-mock functions.C-unwind
. This is much better. However, it causes two new problems:C-unwind
does not yet work for variadic functions.panic=abort
. It's not a problem, as long as no tests areshould_panic
and no tests ever fail 😉 .The text was updated successfully, but these errors were encountered: