Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
1718627440
4 months ago
|
parent
|
context
|
favorite
| on:
A Note on Fil-C
> when malloc() returns NULL? That's a crash - a well-behaved one (no UB involved)
Wrong, dereferencing a NULL pointer is UB.
sph
4 months ago
[–]
Which on UNIXes is a crash because the zero page is unmapped so you get a SIGSEGV
1718627440
4 months ago
|
parent
[–]
Unless the compiler optimized the access away, or replaced it with a different address.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search:
Wrong, dereferencing a NULL pointer is UB.