-
-
Notifications
You must be signed in to change notification settings - Fork 30.9k
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
The compiler may optimise away globals with debug offsets #129223
Comments
(Tagging it as |
This is the fix of #124640 (comment) What regression are you referring to? |
IIUC, it's just that the compiler is not adding some additional information so, because of this additional information, the final binary changes a bit (perhaps the profile itself is changed). Hence the "tiny tiny" (ok, the wording was probably a poor wording). Sorry if I misunderstood what happened though! |
Hummm, seems that I didn't explain myself correctly. Apologies! So what's happening here is that we rely on a global variable compiled in a very specific way to be present in the asyncio module shared object. Unfortunately as nothing else is using the symbol that means that the compiler when using LTO is deciding that as nobody uses the symbol then is safe to remove. This means that the section is never burned into the final shared object and we cannot do the external inspection. The fix doesn't have performance implications: is basically convincing the compiler to leave the global alone even if is not used anywhere apparently :) |
…or debug sections
Oh that's not even an asyncio issue! |
…or debug sections Signed-off-by: Pablo Galindo <pablogsal@gmail.com>
…or debug sections Signed-off-by: Pablo Galindo <pablogsal@gmail.com>
…or debug sections Signed-off-by: Pablo Galindo <pablogsal@gmail.com>
…or debug sections Signed-off-by: Pablo Galindo <pablogsal@gmail.com>
…or debug sections Signed-off-by: Pablo Galindo <pablogsal@gmail.com>
…or debug sections Signed-off-by: Pablo Galindo <pablogsal@gmail.com>
…or debug sections Signed-off-by: Pablo Galindo <pablogsal@gmail.com>
Bug report
Bug description:
When compiling with LTO and other aggressive optimization levels, is possible that the compiler will optimise away globals containing debug offsets. This is currently happening in https://buildbot.python.org/#/builders/125/builds/6895 for the new AsyncioDebug section, making the test fail because the information is not burned in the binary.
CPython versions tested on:
CPython main branch
Operating systems tested on:
Linux
Linked PRs
The text was updated successfully, but these errors were encountered: