2 ms·
Here's an example of how it was used to detect undefined behavior in libwebp: https://trust-in-soft.com/out-of-bounds-pointers-a-common-pattern-and-how-to-avoid
by modeless 9y ago
Here's an example of how it was used to detect undefined behavior in libwebp: https://trust-in-soft.com/out-of-bounds-pointers-a-common-pattern-and-how-to-avoid-it/ https://trust-in-soft.com/out-of-bounds-pointers-a-common-pa...
And musl libc: https://trust-in-soft.com/variadic-functions-in-tis-interpreter/ https://trust-in-soft.com/variadic-functions-in-tis-interpre...
- unwind 9y agoThanks, very interesting. The second one about musl was very long-winded, it seemed it was written for people who have never even heard about varargs, which made me wonder what the intended audience is, heh. I mean, if you know about undefined behavior enough to use a tool to track it down, wouldn't it make sense to also know about C's varargs mechanism? Also it made it sound as if varargs is super-archaic and "best avoided" scary monster thing, which it really isn't in my opinion. It's a well-defined and useful part of the language and really helps make better APIs.
- MaxBarraclough 9y agoOops, I posted a reply to you, but not as a reply - it's over here: https://news.ycombinator.com/item?id=16412494 https://news.ycombinator.com/item?id=16412494
- rurban 9y agoWhile testing all the libc's I found many more issues and quirks: https://rurban.github.io/safeclib/doc/safec-3.2/d1/dae/md_doc_libc-overview.html https://rurban.github.io/safeclib/doc/safec-3.2/d1/dae/md_do... tis-interpreter looks fine enough to be added to my testcases, but it doesn't compile on my macports ocaml. A package would be nice. Travis can build those and store them under release tags.