Re:Mozilla finds CPU bug (bad store forwarding) in Samsung G...
by pengaru on Wednesday August 09, 2023 @12:10PM
(#37064806)
For ages in *nixland the phrase "select is not broken" has been an aphorism for such situations. I'm not sure of its origin, but it's referenced in The Pragmatic Programmer:
[ Parent
| on HN ]
Re:Mozilla finds CPU bug (bad store forwarding) in Samsung G...
by AshamedCaptain on Wednesday August 09, 2023 @01:12PM
(#37065718)
I really don't know when this became "common knowledge". Most OSes and compilers were utter crap not more than 10-20 years ago. We would spend afternoons ranting about MSVC++ bugs. gcc was a joke, and even if quickly improved, does nobody really remember that by the 2010's gcc was so buggy -O3 was barely usable? No Gentoo users around?
Re:Mozilla finds CPU bug (bad store forwarding) in Samsung G...
by RetroTechie on Wednesday August 09, 2023 @01:34PM
(#37066030)
I recall doing some Gentoo installs using -Os at least for some packages, just to see how much that would shrink binary sizes.
Documentation / wikis etc. advised against that not just for performance-of-generated-code reasons, but also because of compiler bugs using -Os was considered unreliable.
Note this was with ancient GCC (v2.9.x, early 3.x releases iirc)
Re:Mozilla finds CPU bug (bad store forwarding) in Samsung G...
by paulddraper on Wednesday August 09, 2023 @06:32PM
(#37069278)
`-O3` was known/documented to be unsafe.
Re:Mozilla finds CPU bug (bad store forwarding) in Samsung G...
by toast0 on Wednesday August 09, 2023 @01:22PM
(#37065859)
Yeah, I don't know where that comes from. Everything is broken.
If you think select is broken, read the docs and make sure you're using it correctly. If you still think select isn't doing what the docs say, try to reduce your actual use into a minimal test case and see. Go look at the source for select on your OS. Search the internet and see if anyone else ran into the same thing (but be careful, because there's lots of bad leads out there).
Re:Mozilla finds CPU bug (bad store forwarding) in Samsung G...
by syncsynchalt on Wednesday August 09, 2023 @01:37PM
(#37066080)
Ironically we later found that `select` is broken by design. `poll` was created as an improvement, and syscalls like `epoll` later refined it further.