
The Story of a Rust Bug - Jonhoo
https://thesquareplanet.com/blog/the-story-of-a-rust-bug/
======
deathanatos
This is a bug in glibc[1] more than it's a bug in Rust.

[1]:
[https://sourceware.org/bugzilla/show_bug.cgi?id=984](https://sourceware.org/bugzilla/show_bug.cgi?id=984)
; from the Reddit thread kibwen linked to[2]

[2]:
[https://news.ycombinator.com/item?id=14324331](https://news.ycombinator.com/item?id=14324331)

~~~
robohamburger
It is sad that bug has been open for so long.

It seems like it would be better to have some kind of dns proxy daemon running
that libc talks to that can pick up these changes immediately but I guess that
is out of the scope of libc :)

~~~
moosingin3space
One can argue that maybe networking functions shouldn't be part of the C
standard library, but maybe a hypothetical "libos" instead, sort of like how
Rust has libcore, libcollections, liballoc, and libstd separated.

I wonder if modularizing libc is at all feasible. Linux lets you use multiple
libcs, so (at the expense of a more complex build) it should be possible
there, at least?

~~~
kmicklas
> Linux lets you use multiple libcs, so (at the expense of a more complex
> build) it should be possible there, at least?

Linux lets you use no libc if you want, too. I suspect the reason this kind of
change doesn't happen is, if you want to make breaking changes like splitting
libc, then you might as well fix all the crap APIs, at which point you might
as well fix the crap language choice (and use say Rust instead) at which point
libc is a low level abstraction that you hardly care about.

------
kibwen
Previous discussion on /r/rust, with the author in-thread answering questions:
[https://www.reddit.com/r/rust/comments/6ai0ga/the_story_of_a...](https://www.reddit.com/r/rust/comments/6ai0ga/the_story_of_a_rust_bug_a_trip_down_a_rabbit_hole/)

------
maximih
Any clue if musl has the same issue?

~~~
evmar
It's buried in the bugs but I noticed this when I skimmed them:
[https://github.com/rust-
lang/libc/pull/585#issuecomment-2977...](https://github.com/rust-
lang/libc/pull/585#issuecomment-297774481)

I'm not sure if that means it means that musl doesn't provide the workaround
or if musl doesn't have the bug at all.

