-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
src/codegen.cpp: fix segfault on @code_native
with eltype (#34434)
#34458
Conversation
The blamed commit is included in quite a few releases, so I'm wondering if this did really introduce the bug or if the bug was there but not as visible? I've marked for backporting to 1.4 but maybe needs to be backported to 1.3 as well. |
The bug does exist in 1.3 as well. |
I started bisecting from 1.2.0 because I noticed it was also broken:
I tested each commit listed in the bisect log above manually with these commands, marking bad if it segfaulted and good otherwise: make -j8
./julia <<< 'Main.@code_native eltype(1)' So yes, I think it has actually been broken since that commit. |
Suggested test which kind of sucks but fails without this change and should work with it: @testset "Issue #34434" begin
io = IOBuffer()
code_native(io, eltype, Tuple{Int})
@test occursin("eltype", String(take!(io)))
end |
Would it be better to put the test in |
I think it makes sense to be part of the Base tests in this case, since it isn't testing InteractiveUtils functionality as much as it is testing for a bug in the core of Julia by way of InteractiveUtils for lack of a better reproducer. |
Putting dependencies on standard libraries (more than really needed) in the Base tests seems bad though. And we already test stuff like #18883 there so why not be consistent? |
Sure, that makes sense. |
Thanks for the fix! |
Fixes #34434
According to git bisect:
8c44566 is the first bad commit