Hacker News new | ask | show | jobs
by laserbeam 1637 days ago
Does it matter? The 128 assumption for these kind of things is there just to allocate a fixed array of 128 thread ids, and going outside that array is a out of bounds magic with pointers.

It's totally reasonable to have a limit. It's totally reasonable to make that limit way higher than you'd think you'd ever need. It's only a bug if you don't enforce thay limit and fail to check for it. And, it's really easy to forget to do that when the easiest way to verify thesr bugs is "wait 15 years until hardware improves".

1 comments

It’s totally not reasonable to have a variable number of things and to store them in a fixed length array. That’s how you get vulnerabilities.

At least check if is going to fit and crash otherwise.