-
-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Probable problem with ASAN #28
Comments
On Linux with ASAN this works ok.
I have a single static |
Followup that MacOS Intel has the same problem with ASAN as above, but works without ASAN. I also tried with the |
Mac ASAN repro steps, on an M1 Mac with Xcode installed:
If you're not on an M1 mac, I don't know how to get cargo test to work with ASAN, as it can't get applied to the proc macros and Cargo doesn't give you any other way to avoid it afaict. It's easier to reproduce then in Chromium probably (kinda ironically) by enabling the tests in //testing/rust_gtest_interop/BUILD.gn (remove the !is_apple at the top) and build the rust_gtest_interop_unittests with |
The ASAN (x86_64) and non-ASAN (aarch64) look similar:
|
I thought about just removing the panic, but it actually does fail some tests on Apple-ASAN, though not all:
|
Changing the tests to verify the number of items in the list, yeah they all fail. Each
|
Ah you don't need to cross compile, you can set the rustflags for your host in |
I stumbled upon this crate on r/rust. I haven't tried it because I'm currently not on a machine that supports ASAN (arm64), but quickly looking at the code, combined with my experience maintaining something similar in Firefox, this crate likely fails in bad ways when building with ASAN. What happens in that case is that each item actually ends up larger than their size, to allow ASAN to do its magic. Which means a) the list is actually larger (in bytes) than expected b) there's a bunch of 0 bytes in between items. In Firefox, what was being aggregated was pointers, so the nulls between items were the same size as the items themselves, but I wouldn't be surprised if the size of the nulls doesn't match with larger items.
The text was updated successfully, but these errors were encountered: