Segmentation fault protection: Difference between revisions

m
no edit summary
mNo edit summary
Line 45:
 
(Note: Simply having an odd number stored in an address register will not crash the CPU by itself. As long as you never attempt to dereference the address register's value, no crash will occur. Otherwise you'd never be able to load byte data! As mentioned before, dereferencing an odd memory address is fine if you use a <code>.B</code> instruction to do so.
 
=={{header|Julia}}==
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:
<lang>ujulia> nsafe_load(convert(Ptr{Int}, C_NULL))
 
Exception: EXCEPTION_ACCESS_VIOLATION at 0x511008e4 -- unsafe_load at .\pointer.jl:105 [inlined]
unsafe_load at .\pointer.jl:105
...
</lang>
 
 
=={{header|Phix}}==
4,104

edits