Hacker News new | ask | show | jobs
by mcguire 3747 days ago
Ok, what's wrong with alloca? Other than blowing the stack, that is.
1 comments

See: https://google.github.io/styleguide/cppguide.html#Variable-L...

At least that's the rationale for why we don't use it at Google.

"More importantly, they allocate a data-dependent amount of stack space that can trigger difficult-to-find memory overwriting bugs: "It ran fine on my machine, but dies mysteriously in production"."

Yep, blowing the stack will do that.