Skip to content

Commit b820c05

Browse files
committed
Add tests for #15240 and #19963
Tests for jl_realloc and jl_free with Null pointer arguments.
1 parent 0586f1a commit b820c05

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

test/core.jl

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4862,3 +4862,12 @@ end
48624862
@test_throws ErrorException isless(MyTime(1), now())
48634863

48644864
end
4865+
4866+
# issue #15240
4867+
4868+
p15240 = ccall(:jl_realloc, Ptr{Void}, (Ptr{Void}, Csize_t), C_NULL, 10)
4869+
ccall(:jl_free, Void, (Ptr{Void}, ), p15240)
4870+
4871+
# issue #19963
4872+
4873+
ccall(:jl_free, Void, (Ptr{Void}, ), C_NULL)

0 commit comments

Comments
 (0)