Earlier quoted context omitted.
Yeap, that's the whole point of it
Huh I misinterpreted the error messages in the example, I thought those were compiler output. This is quite cool then. EDIT: although, it seems like this looses much of its power once you start passing these buffers around to functions that do not use these macros.
Neverflow: C macros that guard against buffer overflows
11–20 of 150 posts
Re: Neverflow: C macros that guard against buffer overflows
#12Re: Neverflow: C macros that guard against buffer overflows
#13Interesting idea, although given the demotion into optional feature in C11, it isn't necessarly portable. Also doesn't cover all the string and memory buffer manipulations. SAL and Frama-C are the bare minimum for security in C code.
Frama-C as a bare minimum is a pipe dream. It's a nice thought, don't get me wrong, but it's hard enough to convince people to add `-fsanitize=...` to their compiler flags. An entire separate static analysis tool with its own learning curve (and its own set of idiosyncrasies) doesn't really qualify for "bare minimum" IMO.
Re: Neverflow: C macros that guard against buffer overflows
#14Why use C and keep reinventing things that C++ provides?
Re: Neverflow: C macros that guard against buffer overflows
#15Why use C and keep reinventing things that C++ provides?
Re: Neverflow: C macros that guard against buffer overflows
#16There is an RFC proposal for the Clang frontend for adding bounds checking reminiscent of Microsoft's SAL. [2]
[1] https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3003.pdf
[2] https://discourse.llvm.org/t/rfc-enforcing-bounds-safety-in-...
Re: Neverflow: C macros that guard against buffer overflows
#17Why use C and keep reinventing things that C++ provides?
C still wins by far when writing libraries that will be used by lots of other people. Doesn't matter what language they are using, they will be able to add in a library written in C very easily. However, C++ or Rust libraries, even with appropriate bindings for the target language, users of the library will need to bring in an entirely new compiler tool chain that may or may not exist on the target architecture. But the C tool chain will exist for that architecture and be robust.
Re: Neverflow: C macros that guard against buffer overflows
#18Interesting idea, although given the demotion into optional feature in C11, it isn't necessarly portable. Also doesn't cover all the string and memory buffer manipulations. SAL and Frama-C are the bare minimum for security in C code.
Re: Neverflow: C macros that guard against buffer overflows
#19Why use C and keep reinventing things that C++ provides?
that being said, some do not want more macros either
Re: Neverflow: C macros that guard against buffer overflows
#20Interesting idea, although given the demotion into optional feature in C11, it isn't necessarly portable. Also doesn't cover all the string and memory buffer manipulations. SAL and Frama-C are the bare minimum for security in C code.
What is SAL?
[1] https://learn.microsoft.com/en-us/cpp/code-quality/understan...