4 ms·
I've used the flags given in the readme on GitHub. gcc -fwrapv generated.c -lm But anyway (besides that this is a lazy answer as it sounds like "not my prob
by still_grokking 4y ago
I've used the flags given in the readme on GitHub.
gcc -fwrapv generated.c -lm
But anyway (besides that this is a lazy answer as it sounds like "not my problem"), how could a C compiler prevent this in the general case?
To play devil's advocate: Why not stick with C as it seems to be the more "secure" language in this case? (Even we all know that C is inherently insecure, which is the reason for alternative system languages in the first place).
- zetalyrae 4y agoIt's not a problem of the language's semantics, which state that stack overflow should trap: https://austral-lang.org/spec/spec.html#rationale-errors https://austral-lang.org/spec/spec.html#rationale-errors Trapping on overflow requires passing a flag to GCC. I didn't list that in the readme because there's like fifty other hardening flags like that and it would overcomplicate the presentation. I'll certainly add it to the build system, when it exists.