News for hackers. Stuff that matters.
Re:How to dismantle a compiler bomb by candiodari on Saturday March 10, 2018 @03:46AM (#16557739)
The code in the example asks for a top-level array of length (uint) -1 with all elements initialized to 1. Overcommit would never help, because where this blows up is not in running the program, but in compiling it.

Even if that weren't true, the only way overcommit ever helps is if you don't initialize or otherwise touch the memory you allocate.

I'm not sure what happens if you try to write zeroes in overcommit allocated memory, but I would bet it breaks because it'll pagefault and linux will allocate it.

Re:How to dismantle a compiler bomb by Aaargh20318 on Saturday March 10, 2018 @10:40AM (#16558858)
I was of course referring to the example in the post I was replying to. If someone allocates an 8GB array but never uses it, that doesn't do anything. The code you're referring to has that array explicitly set as main.