Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
lesenek
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
3 ms
·
1.
▲
by
lesenek
3y ago
If the null dereferencing happens in assembly code and not in C, it seems fine to me: the C standard is irrelevant for assembly; after all, it's the C language that introduces UB, not the machine code.
2.
▲
by
lesenek
3y ago
From my understanding, I think that option only prevents the compiler from removing null checks when the pointer was dereferenced before. It was probably motivated by this incident in the Kernel[1] where an optimized-out null check conditio
3.
▲
by
lesenek
3y ago
I understand the problem, but I am concerned by the solution. The problem is that C semantic is quite clear on the subject[1]: dereferencing a null pointer is undefined behavior, not "non-standard behavior" which would suggests co
4.
▲
by
lesenek
4y ago
(I’m the author.) I will not then. It surprises me that the JVM would handle null pointers by hoping dereferencing one would raise a segfault, considering that the JVM is written in C AFAIK where such dereferencing invokes undefined behavio
5.
▲
Unwinding the Stack the Hard Way
(lesenechal.fr)
1 points
by
lesenek
4y ago
|
1 comments
6.
▲
by
lesenek
4y ago
This is the first article, feedback is welcome, I'd appreciate to know if that kind of content is interesting.