Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

For GCC I have a patch (maybe 10 lines of code) that emits a warning whenever the compiler inserts a trap. You could use a sanitizer, i.e. bounds checking or signed overflow, add code that turns the warning into an error, and so ensure that your code does not have a signed overflow or OOB.



That sounds like a useful patch. Why didn't you upstream it?


I submitted it upstream but it was not accepted. There was a request to add a string argument that can be printed with the warning.


Sanitizers don’t ship to production.


The use case I described is not for production.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: