Skip to content

Commit

Permalink
investigate segfaults on CI
Browse files Browse the repository at this point in the history
The segfaults on CI seem to point to these two tests in particular.
Let's see if disabling them fixes CI or whether that might have just
been a red herring
  • Loading branch information
simeonschaub committed Oct 19, 2023
1 parent 7beca92 commit a84dce3
Showing 1 changed file with 39 additions and 39 deletions.
78 changes: 39 additions & 39 deletions test/interpret.jl
Original file line number Diff line number Diff line change
Expand Up @@ -866,29 +866,29 @@ end
@test @interpret(fw(obs)) == fw(obs)
end

@testset "TypedSlots" begin
function foo(x, y)
z = x + y
if z < 4
z += 1
end
u = (x -> x + z)(x)
v = Ref{Union{Int, Missing}}(x)[] + y
return u + v
end

ci = code_typed(foo, NTuple{2, Int}; optimize=false)[][1]
@static if VERSION v"1.10.0-DEV.873"
mi = Core.Compiler.method_instances(foo, NTuple{2, Int}, Base.get_world_counter())[]
else
mi = Core.Compiler.method_instances(foo, NTuple{2, Int})[]
end

frameargs = Any[foo, 1, 2]
framecode = JuliaInterpreter.FrameCode(mi.def, ci)
frame = JuliaInterpreter.prepare_frame(framecode, frameargs, mi.sparam_vals)
@test JuliaInterpreter.finish_and_return!(frame) === 8
end
#@testset "TypedSlots" begin
# function foo(x, y)
# z = x + y
# if z < 4
# z += 1
# end
# u = (x -> x + z)(x)
# v = Ref{Union{Int, Missing}}(x)[] + y
# return u + v
# end
#
# ci = code_typed(foo, NTuple{2, Int}; optimize=false)[][1]
# @static if VERSION ≥ v"1.10.0-DEV.873"
# mi = Core.Compiler.method_instances(foo, NTuple{2, Int}, Base.get_world_counter())[]
# else
# mi = Core.Compiler.method_instances(foo, NTuple{2, Int})[]
# end
#
# frameargs = Any[foo, 1, 2]
# framecode = JuliaInterpreter.FrameCode(mi.def, ci)
# frame = JuliaInterpreter.prepare_frame(framecode, frameargs, mi.sparam_vals)
# @test JuliaInterpreter.finish_and_return!(frame) === 8
#end

@testset "interpretation of unoptimized frame" begin
let # should be able to interprete nested calls within `:foreigncall` expressions
Expand Down Expand Up @@ -952,22 +952,22 @@ end
@test @interpret (Base.Experimental.@opaque x->3*x)(4) == 12
end

# CassetteOverlay, issue #552
@static if VERSION >= v"1.8"
using CassetteOverlay
end

@static if VERSION >= v"1.8"
function foo()
x = IdDict()
x[:foo] = 1
end
@MethodTable SinTable;
@testset "CassetteOverlay" begin
pass = @overlaypass SinTable;
@test (@interpret pass(foo)) == 1
end
end
## CassetteOverlay, issue #552
#@static if VERSION >= v"1.8"
#using CassetteOverlay
#end
#
#@static if VERSION >= v"1.8"
#function foo()
# x = IdDict()
# x[:foo] = 1
#end
#@MethodTable SinTable;
#@testset "CassetteOverlay" begin
# pass = @overlaypass SinTable;
# @test (@interpret pass(foo)) == 1
#end
#end

using LoopVectorization

Expand Down

0 comments on commit a84dce3

Please sign in to comment.