Closed akbulutdora closed 4 months ago
Technically both are wrong.
On all the platforms except WASM, dereferencing the nil
pointer will cause a segmentation fault. On WASM, this is currently perfectly valid to do (because WASM's memory model is pretty bad).
To be more correct, it might better to phrase it as something like the following:
platform specific behaviour, usually a segmentation fault on most platforms
The documentation states that dereferencing an uninitialized pointer will cause a
panic
. However it causes a segfault.