top | item 36459683

(no title)

leodag | 2 years ago

Wasn't that because of Variable-Length Arrays? I remember a while back there was a movement to remove all of them from the kernel.

discuss

order

asveikau|2 years ago

Perhaps. I think there are other reasons to avoid VLAs. I've heard the code generated for them kinda sucks.

But IMO a compiler should generate extra benign reads on a large stack allocation. You mention avoiding VLAs in the kernel, but even user mode code has this problem.

Certainly a browser JITing random JS from the internet should be able to work around such a problem.