ASAN stack-buffer-overflow when calling FFI function on nightly compiler #86171
Labels
A-FFI
Area: Foreign function interface (FFI)
C-bug
Category: This is a bug.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
I tried out ASAN on some code that calls into C
I expected there to be no problems with this, since as far as I can tell the FFI function signature matches the C function I am calling, but instead ASAN was not happy. It seems to be upset about some read to stack memory in the preparation to call the FFI function. I was not able to determine if the instructions generated by the compiler is actually reading something it shouldn't be or if ASAN is here is making a mistake.
When I build and run the code without ASAN enabled, it works as expected (although of course this isn't a guarantee of no memory issue)
Meta
rustc --version --verbose
:clang --version
:This is how I built and ran the Rust and C code for the purpose of a small repro of the issue
The text was updated successfully, but these errors were encountered: