Segmentation fault protection: Difference between revisions

Content added Content deleted
mNo edit summary
Line 48: Line 48:
=={{header|Julia}}==
=={{header|Julia}}==
Most commonly, segfaults in Julia are indications of a problem in a called C library. However, the functions in Julia prefixed with
Most commonly, segfaults in Julia are indications of a problem in a called C library. However, the functions in Julia prefixed with
unsafe_, such as unsafe_load(), can be used to cause a segfault in the LLVM interpreterused to run Julia:
unsafe_, such as unsafe_load(), can be used to reference a null pointer as in C, and can thus cause a segfault in the LLVM interpreterused to run Julia:
<lang>ujulia> nsafe_load(convert(Ptr{Int}, C_NULL))
<lang>julia> unsafe_load(convert(Ptr{Int}, C_NULL))


Exception: EXCEPTION_ACCESS_VIOLATION at 0x511008e4 -- unsafe_load at .\pointer.jl:105 [inlined]
Exception: EXCEPTION_ACCESS_VIOLATION at 0x511008e4 -- unsafe_load at .\pointer.jl:105 [inlined]
Line 55: Line 55:
...
...
</lang>
</lang>



=={{header|Phix}}==
=={{header|Phix}}==