Re:Glibc getaddrinfo stack-based buffer overflow
by minimax on Tuesday February 16, 2016 @06:39PM
(#11114001)
I think the other thing that changed is that branch predictors are roughly infinitely times better than they were in 1980. The is-this-subscript-ok check should be easily predictable and I wonder if these checks even cost anything in a hot loop on a modern CPU.
[ Parent
| on HN ]
Re:Glibc getaddrinfo stack-based buffer overflow
by pjmlp on Wednesday February 17, 2016 @02:22AM
(#11115974)
After Z80 and Sinclair Basic, my next languages were GW-Basic, Turbo Basic and Turbo Pascal, followed by many others.
The Borland languages like many other that allowed for system programming in those days, allowed for disabling bounds checking, as Borland customers weren't like Hoare ones.
I never felt the need to disable them.
Yes they did had a few ms to the program execution, but nothing that would impact the user experience of the application.
This is one of the biggest problem in our industry, specially among C and its derived languages (C++, Objective-C), to micro-optimize each code line without any sort of measurement how it impacts the final application.
Of course there are cases where it really matters, like HPC, games and such, but those are a tiny portion of the software that gets written every day.
Re:Glibc getaddrinfo stack-based buffer overflow
by kevingadd on Tuesday February 16, 2016 @09:16PM
(#11114722)
They have a measurable cost, and performance-obsessed developers/users hate the cost. But it's a lot smaller than it used to be, and modern compiler/JIT research is yielding ways to safely eliminate/hoist a lot of the checks.