Re:Getaddrinfo() on glibc calls getenv(), oh boy
by jiggawatts on Monday October 16, 2023 @11:00PM
(#37910023)
This kind of historical baggage is one of the main reasons I now completely avoid C/C++ programming and won't touch it ever again. It's Rust or C# only for me from here on...
[ Parent
| on HN ]
Re:Getaddrinfo() on glibc calls getenv(), oh boy
by thayne on Tuesday October 17, 2023 @01:29AM
(#37910971)
The problem is that this effects higher languages too, because they often build on libc. And on some OSes, they don't have a choice, because the system call interface is unstable and/or undocumented).
For example in rust, multiple time libraries were found to be unsound if `std::env::set_env` was ever called from a multi-threaded program. See:
https://github.com/time-rs/time/issues/293 and https://github.com/chronotope/chrono/issues/499