-
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
Debug info for const generics is hashes rather than something nice #115786
Comments
Actually I am seeing the name change in #115803 as well, so it's not some alloc ID change, it's... maybe a slightly different representation of the same const value? |
Mystery solved! It's this hash right here: rust/compiler/rustc_codegen_ssa/src/debuginfo/type_names.rs Lines 664 to 670 in e16a6d0
Now, whether that's expected behavior or not, I cannot say. |
Ah yea... I guess I should check how we render strings. It's probably an issue if we have symbol names that themselves are multiple megabytes large |
Does rust-lang/rfcs#3161 fix this? Not sure if v0 mangling is involved and what happens for old-school mangling (or if old-school mangling is even still a thing). EDIT: The PR doesn't change the relevant test, so I guess the answer is "no". Are there any plans to completely switch to v0 name mangling, or do we need a similar fix for old name mangling? |
FYI: these names are part of debuginfo and not related to symbol mangling. Any change to the debuginfo version of these names should be done with care to make sure we don't break GDB, LLDB, NatVis, etc. |
cc #126060 |
In #115748 I got a test failure in tests/debuginfo/function-names.rs:
function_names::const_generic_fn_non_int<{CONST#ad91263f6d2dd96e}>
changed tostatic fn function_names::const_generic_fn_non_int<{CONST#73a38766b652ae7d}>
. That PR leads to some new AllocIds being generated which shifts some IDs around, so it seems like the AllocId are affecting the function name here. @oli-obk was confused by this since with valtrees, shouldn't our function names be stable now? Indeed AllocId are not very stable at all so it seems potentially problematic if they are relevant for function names. The underlying function call isconst_generic_fn_non_int::<{ () }>
so this is not a very complicated valtree. ;)Cc @rust-lang/project-const-generics
The text was updated successfully, but these errors were encountered: