-
Notifications
You must be signed in to change notification settings - Fork 13.5k
DFSAN release_shadow_space.c is flaky #91287
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
Comments
@MaskRay : maybe you have thoughts on this? |
The current pass rate on the bot is ~50%. llvm#91287
Seems fine to disable it now. I've seen it failed for unrelated patches. |
The current pass rate on the bot is ~50%. #91287
This test case shows a limitation of DFSan's sscanf implementation (introduced in https://reviews.llvm.org/D153775): it simply ignores ordinary characters in the format string, instead of actually comparing them against the input. This may change the semantics of instrumented programs. Importantly, this also means that DFSan's release_shadow_space.c test, which relies on sscanf to scrape the RSS from /proc/maps output, will incorrectly match lines that don't contain RSS information. As a result, it is scraping numbers from irrelevant output (e.g., base addresses), and can therefore result in test flakiness (llvm#91287).
The reason for the failure is that DFSan's sscanf is ignoring ordinary characters in the format string. DFSan's release_shadow_space.c test relies on sscanf to scrape the RSS from /proc/maps output and is therefore scraping numbers from irrelevant output (e.g., base addresses), leading to test flakiness. I've added a test case that illustrates this: #94700 |
This test case shows a limitation of DFSan's sscanf implementation (introduced in https://reviews.llvm.org/D153775): it simply ignores ordinary characters in the format string, instead of actually comparing them against the input. This may change the semantics of instrumented programs. Importantly, this also means that DFSan's release_shadow_space.c test, which relies on sscanf to scrape the RSS from /proc/maps output, will incorrectly match lines that don't contain RSS information. As a result, it adding together numbers from irrelevant output (e.g., base addresses), resulting in test flakiness (#91287).
DFSan's sscanf is incorrect (llvm#94769), which results in erroneous matches when scraping RSS /proc/maps. This patch works around the issue by using strstr as a secondary check. It also adds a loose validity check for the initial RSS, to guard against future regressions in get_rss_kb(). Fixes llvm#91287
DFSan's sscanf is incorrect (#94769), which results in erroneous matches when scraping RSS from /proc/maps. This patch works around the issue by using strstr as a secondary check. It also adds a loose validity check for the initial RSS measurement, to guard against regressions in get_rss_kb(). Fixes #91287
DFSan's sscanf is incorrect (llvm#94769), which results in erroneous matches when scraping RSS from /proc/maps. This patch works around the issue by using strstr as a secondary check. It also adds a loose validity check for the initial RSS measurement, to guard against regressions in get_rss_kb(). Fixes llvm#91287 Signed-off-by: Hafidz Muzakky <[email protected]>
For a few days, I see this test being flaky on the bot, here is an example run: https://lab.llvm.org/buildbot/#/builders/272/builds/15892
The text was updated successfully, but these errors were encountered: