-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Open
Milestone
Description
This:
module MWE
g(xs...) = 1
# Make a callable out of the format that OpaqueClosure expects, where the first
# argument is a Tuple of the captures. `code_ircode` on this yields IR that can
# be fed to the Core.OpaqueClosure constructor, with g as a capture.
(t::Tuple{typeof(g)})(xs...) = t[1](xs...)
ir = Base.code_ircode_by_type(Tuple{Tuple{typeof(g)}, Symbol, Symbol})[1][1]
ir.argtypes[1] = Tuple{typeof(g)}
oc = Core.OpaqueClosure(ir, g; isva=true, do_compile=true)
oc(:a, :b) # segfault on 1.12
end
segfaults on 1.12.0-rc1 as well as master from last week, but passes fine on 1.11.6.
Has there been an intentional change to opaque closure varargs on 1.12 that I don't understand, or is this a bug? cc @willtebbutt who is likewise confused by this.
willtebbutt and PallHaraldsson
Metadata
Metadata
Assignees
Labels
No labels