about summary refs log tree commit diff stats
path: root/001help.cc
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2016-06-02 09:15:40 -0700
committerKartik K. Agaram <vc@akkartik.com>2016-06-02 09:15:40 -0700
commit2367988301704881a61ca12c23eda9c385c43d3e (patch)
tree613a6b3d8a3d25db89ee6944a524abfc32c1d4e1 /001help.cc
parente8eea70ab1f70822f756be3750817ac5e24bf24d (diff)
downloadmu-2367988301704881a61ca12c23eda9c385c43d3e.tar.gz
3026 - integer overflow protection
How did I not know about -ftrapv for so long?! Found while reading
Memarian et al, "Into the depths of C: Elaborating the de facto
standards".
  http://www.cl.cam.ac.uk/~pes20/cerberus/pldi16.pdf
Diffstat (limited to '001help.cc')
-rw-r--r--001help.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/001help.cc b/001help.cc
index 1b24f217..b8dbe7a6 100644
--- a/001help.cc
+++ b/001help.cc
@@ -96,8 +96,8 @@ bool is_equal(char* s, const char* lit) {
 :(before "End Includes")
 #define SIZE(X) (assert((X).size() < (1LL<<(sizeof(int)*8-2))), static_cast<int>((X).size()))
 //:
-//: 5. Integer overflow is still impossible to guard against. Maybe after
-//: reading http://www.cs.utah.edu/~regehr/papers/overflow12.pdf
+//: 5. Integer overflow is guarded against at runtime using the -ftrapv flag
+//: to the compiler, supported by both GCC and LLVM.
 //:
 //: 6. Map's operator[] being non-const is fucking evil.
 :(before "Globals")  // can't generate prototypes for these