Elektrine lite

← Feed

@manx@mastodon.online

Post #2636437

2026-04-07 12:16 UTC

@DanielaKEngert@hachyderm.io @andreasfertig@mas.to You missed "statically". If the compiler cannot tell me at compile-time that the code is wrong, it is rather useless. All you are suggesting is trading Undefined Behaviour for assertion failure. Both result in a Denial-Of-Service vulnerability due to a memory bug. Both are bugs I need to fix. Run-time hardening of the standard library cannot help here. P3100 cannot help here.

Replies (2)

  • @DanielaKEngert@hachyderm.io 2026-04-07 12:22

    @manx@mastodon.online @andreasfertig@mas.to I'm not sure if I follow you. If you are willing to bring a code example (e.g. Compile Explorer) where you can substantiate your claim, we can look at it in the committee and see what we can do.

    Open ##2636438

  • @manx@mastodon.online 2026-04-07 12:18

    @DanielaKEngert@hachyderm.io I think reducing the amount of UB in C++ is a good goal to strive for in general (within some limits), however in cases like this, all it can do in is changing UB to an assertion failure. From a perspective of the code author, the outcome is exactly the same: I need to fix a bug. The bug is still there, it might just manifest itself in less extreme ways (which is good). UB is not the important problem here. The problem is teaching writing completely broken code.

    Open ##3596502