Re:How to use the new counted_by attribute in C (and Linux)
by db48x on Saturday July 20, 2024 @03:42PM
(#41019163)
It’s just as easy to make that mistake, but at least then the compiler can issue a warning.
[ Parent
| on HN ]
Re:How to use the new counted_by attribute in C (and Linux)
by akira2501 on Saturday July 20, 2024 @05:39PM
(#41020201)
It's better than that. If you use FORTIFY_SOURCE then you will get _runtime_ bounds checking.
So, while you still have to make sure your structure is sane, now the runtime can play along too.