Re:C99 doesn't need function bodies, or 'VLAs are Turing com...
by fpoling on Thursday August 04, 2022 @04:11PM
(#32347697)
VLAs are unsafe in the worst kind of way as it is not possible to query when it is safe to use them. alloca() at least in theory can return null stack overflow, but there is no such provision with VLA.
[ Parent
| on HN ]
Re:C99 doesn't need function bodies, or 'VLAs are Turing com...
by astrange on Friday August 05, 2022 @01:12AM
(#32351997)
They're not unsafe (in the memory sense) as long as they check for overflow and reliably crash if there is one.
Re:C99 doesn't need function bodies, or 'VLAs are Turing com...
by naasking on Friday August 05, 2022 @03:33AM
(#32352886)
If a lot of platforms don't implement this check reliably, then it's unsafe in practice at this time, even if not in theory.