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
Compile failure with optimized ASan builds #1225
Comments
Just tried and couldn't reproduce on MacOS. Will try Linux next. |
Does not reproduce on Linux with CLang. Must be GCC specific. |
Summary: The leak was caused by the allocation of the alt signal stack. To prevent leak reporting, it is stored into a global symbol. However, that symbol is unused and can be optimized out. Force it to be considered "used". Closes facebook#1225 Differential Revision: D52356667
Hi, @nth10sd. I was able to reproduce this on Linux with gcc. The fix is in #1227 .
It depends on what you mean by "supported". We are not proactively testing the configuration "gcc+opt+ASAN+Linux" and have no plans to change that for now, since we don't use it ourselves. So, we can't guarantee that we will always investigate and address reports like this one promptly (in this case, I got just curious and dug a little, but I don't always have the time). Mostly, we expect improvements and bugfixes for such cases from the community, in the form of PRs. OTOH, "clang+opt+ASAN+MacOS" is much higher on our list of priorities. Generally speaking, as an open source project, we can't provide real support for building the project. It is all best effort. We do our best to make it buildable and runnable on as wide possible set of platforms and compilers, but ultimately it has to be assumed that developers trying to build Hermes (as opposed to just use it) can deal with the associated challenges. That goes double for running in ASAN mode. Hopefully devs who want to run Hermes with ASAN can help us with diagnosing and fixing the associated problems. So, for example, if someone wanted to build and run Hermes on OpenBSD, we couldn't help with that, or "support" that case. But if they submitted a well documented PR, we would gladly accept it. |
Understood, thanks for fixing this one! |
Summary: Original Author: tmikov@meta.com Original Git: e5faff3 Original Reviewed By: avp Original Revision: D52356667 Pull Request resolved: #1227 The leak was caused by the allocation of the alt signal stack. To prevent leak reporting, it is stored into a global symbol. However, that symbol is unused and can be optimized out. Force it to be considered "used". Closes #1225 Reviewed By: tmikov Differential Revision: D52854397 fbshipit-source-id: 125041148f00e0b2fe21b26971a1a6ad677cfd86
I ran
cmake -S ~/trees/hermes/ -B opt_asan_hermes -G Ninja -DCMAKE_BUILD_TYPE=Release -D HERMES_ENABLE_ADDRESS_SANITIZER=ON
to try and get a optimized ASan build, thencmake --build opt_asan_hermes/
to try building it. It fails at:Tested on rev b538d92, Dec 19, 2023 build. The other modes (debug, opt, debug ASan) work just fine, as per the README. I understand that this mode (opt ASan) is not in the README - my question is, will this mode ever be supported?
Other versions:
The text was updated successfully, but these errors were encountered: