-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
AArch64 Linux CI failure #77615
Comments
@rustbot ping arm |
Hey ARM Group! This bug has been identified as a good "ARM candidate". cc @JamieCunliffe @joaopaulocarreiro @raw-bin @Stammark @vigoux |
This change is due to a recent change in rust-demangler (in #77080), which uses a regex to strip off "crate disambiguators" from demangled names. The regex assumes the pattern has 16 hex characters enclosed in square brackets.
I'm not sure why AArch64 shows only 15 characters. Could this be a leading zero issue? In which case, the regex needs to be less rigid. Or is there a bug related to generating the character string on AArch64? We could bandaid this, but I don't want to close it out with a Regex change that might cover up some other problem. @alexcrichton - This uses your Also, I was wondering if you think it's worth adding an option to the library to generate demangled names without the crate disambiguators, avoiding the need for the regex replacement. |
Hm I'm not entirely sure! It seems like the most likely situation here is that the hash is different depending on the target platform (x86_64 vs aarch64) and perhaps the hash is just wrong enough that the regex isn't stripping it? (like the leading zero idea you had). I am not intimately familiar with the symbol mangling here though myself so there could be a bug in rustc-demangle as well, I'm just not sure. |
It looks like it's definitely possible to have disambiguators shorter than 16 characters, because the format code doesn't enforce a specific width: That means that, for now, this is a bug in the rust-demangler tool, regardless of the target platform/architecture. The fact that this happens on AArch64 might just be a random coincidence. I'll submit a patch to make the regex more forgiving. @alexcrichton - Do you maintain the rustc-demangler library, and if so, what do you think about also including an option in the library to omit these disambiguators? Note that I had to strip them because they aren't cross-platform stable, and for some use cases (like the source code coverage tooling) it's better to leave them off. (FYI, @wesleywiser @tmandry ) |
BTW, yes, the hash changes depending on some factor, not simply the CPU type though. I first ran into the issue here: https://github.com/rust-lang-ci/rust/runs/1197008506 The demangled crate disambiguator hashes were different between my linux workstation (where I generated the original blessed test output) linux, vs. one of the Ubuntu platforms vs. MSVC. They are all x86_64-based, but all had different values. |
Seems reasonable to me to have an option for that! |
Thanks. No hurry, assuming #77627 lands, this issue here should be resolved. Also, when I was changing the Regex in the fix, I realized the pattern I'm not sure that the demangler library distinguishes them, so if you do add the option, you may want to consider checking the value, maybe like I did with the regex (though since the library is starting with a number, you could simply check if the value is below a threshold). It sounds a big hacky, but I'm not sure what else to suggest. |
rust-demangler tool strips crate disambiguators with < 16 digits Addresses Issue rust-lang#77615.
The fix was merged, and these tests now pass again: https://github.com/rust-lang-ci/rust/runs/1229835355
|
aarch-gnu
looks like it's been failing for a while (and no one noticed because it's auto-fallible).Originally posted by @jyn514 in #76356 (comment)
The text was updated successfully, but these errors were encountered: