Skip to content
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

uncompressing method source results in corrupted debuginfo #55688

Closed
simeonschaub opened this issue Sep 4, 2024 · 2 comments
Closed

uncompressing method source results in corrupted debuginfo #55688

simeonschaub opened this issue Sep 4, 2024 · 2 comments

Comments

@simeonschaub
Copy link
Member

The codelocs field here seems to have been corrupted:

julia> fnone1() = nothing;

julia> Base.uncompressed_ast(only(methods(fnone1))).debuginfo
Core.DebugInfo(Symbol("REPL[1]"), nothing, svec(), "\x01\0\0\0\0\0\0\0\0\0\0\0\x01\x01\0")

Note that code_lowered seems to handle this correctly:

julia> only(code_lowered(fnone1)).debuginfo
Core.DebugInfo(Symbol("REPL[1]"), nothing, svec(), "")

Interestingly, this also goes away as soon as the binding nothing is resolved in Main:

julia> nothing

julia> fnone2() = nothing;

julia> Base.uncompressed_ast(only(methods(fnone2))).debuginfo
Core.DebugInfo(Symbol("REPL[2]"), nothing, svec(), "")

cc @vtjnash

@vtjnash
Copy link
Member

vtjnash commented Sep 4, 2024

I am not quite sure what this is supposed to mean by "corrupted". The tables describe different IR, so of course they will have some different content?

julia> code_lowered(fnone1)
2-element Vector{Core.CodeInfo}:
 CodeInfo(
    @ REPL[4]:1 within `unknown scope`
1 ─ %1 = Main.nothing
└──      return %1
)
 CodeInfo(
1 ─     return Main.nothing
)

@simeonschaub
Copy link
Member Author

Hmm, true. I guess I got confused because code_lowered seems to be stripping debuginfo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants