Compiled binary hangs on Windows when receiving SIGABRT

The binary is compiled with julia 1.9.4. The following two problems both lead to hanging:

Cannot protect page @0000000000000000 of size 1048576 to 0x4 (err 0x1e7)

[12024] signal (22): SIGABRT
in expression starting at none:1
crt_sig_handler at C:/workdir/src\signals-win.c:95
raise at C:\Windows\System32\msvcrt.dll (unknown line)
abort at C:\Windows\System32\msvcrt.dll (unknown line)
protect_page at C:/workdir/src\cgmemmgr.cpp:78 [inlined]
get_wr_ptr at C:/workdir/src\cgmemmgr.cpp:613 [inlined]
alloc at C:/workdir/src\cgmemmgr.cpp:589 [inlined]
allocateCodeSection at C:/workdir/src\cgmemmgr.cpp:870

Please submit a bug report with steps to reproduce this fault, and any error messages that follow (in their entirety). Thanks.
Exception: UNKNOWN at 0x7ff963673b19 --
[20632] signal (22): SIGABRT
in expression starting at none:1
crt_sig_handler at C:/workdir/src\signals-win.c:95
raise at C:\Windows\System32\msvcrt.dll (unknown line)
abort at C:\Windows\System32\msvcrt.dll (unknown line)
realloc_s at C:/workdir/src/support\dtypes.h:359 [inlined]
realloc_s at C:/workdir/src/support\dtypes.h:351 [inlined]
gc_mark_stack_resize at C:/workdir/src\gc.c:1934
gc_mark_stack_push at C:/workdir/src\gc.c:1953 [inlined]
gc_mark_loop at C:/workdir/src\gc.c:2821
_jl_gc_collect at C:/workdir/src\gc.c:3407
ijl_gc_collect at C:/workdir/src\gc.c:3713
maybe_collect at C:/workdir/src\gc.c:1083 [inlined]
jl_gc_pool_alloc_inner at C:/workdir/src\gc.c:1450 [inlined]
jl_gc_pool_alloc_noinline at C:/workdir/src\gc.c:1511 [inlined]
jl_gc_alloc_ at C:/workdir/src\julia_internal.h:460 [inlined]
jl_gc_alloc at C:/workdir/src\gc.c:3760
_new_array_ at C:/workdir/src\array.c:134
_new_array at C:/workdir/src\array.c:198 [inlined]
ijl_alloc_array_1d at C:/workdir/src\array.c:436

Please submit a bug report with steps to reproduce this fault, and any error messages that follow (in their entirety). Thanks.
Exception: UNKNOWN at 0x7ff963673b19 --

On Linux, however, using kill -SIGABRT pid will make both julia and compiled binary exiting without hanging.