Skip to content

Commit

Permalink
Back-out PR #19911
Browse files Browse the repository at this point in the history
Since we no longer run finalizers at exit.
  • Loading branch information
kpamnany committed Oct 11, 2023
1 parent c81708f commit c3f5c3a
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 9 deletions.
4 changes: 0 additions & 4 deletions src/ccalltest.c
Expand Up @@ -956,9 +956,5 @@ DLLEXPORT int threadcall_args(int a, int b) {
return a + b;
}

DLLEXPORT void c_exit_finalizer(void* v) {
printf("c_exit_finalizer: %d, %u", *(int*)v, (unsigned)((uintptr_t)v & (uintptr_t)1));
}

// global variable for cglobal testing
DLLEXPORT const int global_var = 1;
5 changes: 0 additions & 5 deletions test/ccall.jl
Expand Up @@ -1102,11 +1102,6 @@ let A = [1]
@test ccall((:get_c_int, libccalltest), Cint, ()) == -1
end

# Pointer finalizer at exit (PR #19911)
let result = read(`$(Base.julia_cmd()) --startup-file=no -e "A = Ref{Cint}(42); finalizer(cglobal((:c_exit_finalizer, \"$libccalltest\"), Cvoid), A)"`, String)
@test result == "c_exit_finalizer: 42, 0"
end

# SIMD Registers

const VecReg{N,T} = NTuple{N,VecElement{T}}
Expand Down

0 comments on commit c3f5c3a

Please sign in to comment.