aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMattias Andrée <maandree@member.fsf.org>2015-12-30 02:46:26 +0100
committerMattias Andrée <maandree@member.fsf.org>2015-12-30 02:46:29 +0100
commit196accbfe0ac77e492a67cc2d49821ae2c94535b (patch)
treecb8eb5965b7fdf2bc3992822cf73fc535eaaceda
parentadd reopen (diff)
downloadslibc-196accbfe0ac77e492a67cc2d49821ae2c94535b.tar.gz
slibc-196accbfe0ac77e492a67cc2d49821ae2c94535b.tar.bz2
slibc-196accbfe0ac77e492a67cc2d49821ae2c94535b.tar.xz
deferencing null is legal
Signed-off-by: Mattias Andrée <maandree@member.fsf.org>
-rw-r--r--include/stddef.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/stddef.h b/include/stddef.h
index c2a806b..8330da4 100644
--- a/include/stddef.h
+++ b/include/stddef.h
@@ -42,6 +42,16 @@
* but excessive use of C++, and especially it
* features, is harmful too.
*
+ * Strictly speaking, to deference `NULL` is not an
+ * illegal action, but the operating system will
+ * kill you with `SIGSEGV` (segmentation fault or
+ * acess violation), and makes your you have no reason
+ * to my never mapping any memory there. However, the
+ * operating system itself, and programs running
+ * before the operating system, that is, any program
+ * not abstracted away from the hardware by virtual
+ * memory, have use of the address 0.
+ *
* @etymology Pointer with numerical value (0).
*
* @since Always.