From 72fb012e8346ada8505f9bdc10757a3772f07917 Mon Sep 17 00:00:00 2001 From: Takafumi Arakaki Date: Wed, 10 Mar 2021 18:50:46 -0500 Subject: [PATCH] Avoid finalizer to be compiled during test_jl_dump_compiles_toplevel_thunks --- test/compiler/codegen.jl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/compiler/codegen.jl b/test/compiler/codegen.jl index 2b7b266751a08..47f419d9937a2 100644 --- a/test/compiler/codegen.jl +++ b/test/compiler/codegen.jl @@ -73,11 +73,13 @@ function test_jl_dump_compiles_toplevel_thunks() # Make sure to cause compilation of the eval function # before calling it below. Core.eval(Main, Any[:(nothing)][1]) + GC.enable(false) # avoid finalizers to be compiled topthunk = Meta.lower(Main, :(for i in 1:10; end)) ccall(:jl_dump_compiles, Cvoid, (Ptr{Cvoid},), io.handle) Core.eval(Main, topthunk) ccall(:jl_dump_compiles, Cvoid, (Ptr{Cvoid},), C_NULL) close(io) + GC.enable(true) tstats = stat(tfile) tempty = tstats.size == 0 rm(tfile)