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

do_typeinf!(interp, mi) does not always put mi into cache #586

Closed
simeonschaub opened this issue Aug 12, 2024 · 1 comment · Fixed by #591
Closed

do_typeinf!(interp, mi) does not always put mi into cache #586

simeonschaub opened this issue Aug 12, 2024 · 1 comment · Fixed by #591
Labels
bug Something isn't working upstream

Comments

@simeonschaub
Copy link
Collaborator

On nightly, the following returns false:

julia> using Cthulhu

julia> mi = Core.Compiler.specialize_method(Base._methods(seekstart, (IOBuffer,), -1, Base.get_world_counter())[])
MethodInstance for seekstart(::IOBuffer)

julia> interp = Cthulhu.CthulhuInterpreter()
Cthulhu.CthulhuInterpreter(Core.Compiler.NativeInterpreter(...), IdDict{Union{Core.Compiler.InferenceResult, Core.MethodInstance}, Cthulhu.InferredSource}(), IdDict{Core.MethodInstance, Core.CodeInstance}(), IdDict{Union{Core.Compiler.InferenceResult, Core.MethodInstance}, Vector{Pair{Int64, String}}}(), IdDict{Union{Core.Compiler.InferenceResult, Core.MethodInstance}, Dict{Int64, Core.Compiler.Effects}}(), IdDict{Union{Core.Compiler.InferenceResult, Core.MethodInstance}, Dict{Int64, Any}}())

julia> Cthulhu.do_typeinf!(interp, mi)

julia> mi in keys(interp.opt)
false

whereas on 1.11:

julia> mi in keys(interp.opt)
true

This causes e.g. @descend annotate_source=false seekstart(IOBuffer()) to error. Perhaps this is a regression in base?

@simeonschaub simeonschaub added the bug Something isn't working label Aug 12, 2024
@simeonschaub
Copy link
Collaborator Author

I bisected this to JuliaLang/julia#54816

@vtjnash Is this a bug in that PR or is this working as intended and we just need to make adjustments on our side?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working upstream
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant