diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2016-06-02 15:46:17 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2016-06-02 15:46:17 -0700 |
commit | 5b5ef63b934bc49a46fc654ac8bfcd3142c73f6f (patch) | |
tree | 8b13f0b10585897ebd9eadae65dfa3d2625506e5 /edit/002-typing.mu | |
parent | c58e23683c2abbd368f06ef664a9341305b3a63c (diff) | |
download | mu-5b5ef63b934bc49a46fc654ac8bfcd3142c73f6f.tar.gz |
3031 - better integer overflow protection
This improves on commit 3026; it turns out you need to manually handle the traps generated by -ftrapv. https://gist.github.com/mastbaum/1004768 Signal handling is based on https://spin.atomicobject.com/2013/01/13/exceptions-stack-traces-c. Various combinations of platform+compiler seem to work very differently: gcc everywhere seems to have extremely threadbare ftrapv support Clang + OSX generates SIGILL. Clang + Linux is advertised to generate SIGABRT, so I handle that out of an excess of caution. However, in my experience it seems to kill the program (sometimes segfaulting) even without any signal handlers installed. In the process, I realized that all my current builds are using Clang, so I added one little test on CI to use g++ in commit 3029.
Diffstat (limited to 'edit/002-typing.mu')
0 files changed, 0 insertions, 0 deletions