Comment 5 for bug 386791

Revision history for this message
Fibonacci (fibonacci-prower) wrote : Re: aMSN crashes when running it twice

The root of the problem is that getaddrinfo("localhost", NULL, NULL, &result); (which is what aMSN does - both in the official and the SVN version) causes a segfault in my system. There's no reason it should cause a segfault, so the bug, as originally stated, is not within aMSN code.

However, doing some experimentation, I discovered that the segfault will only happen if /etc/hosts contains a *very* long line - around 3000-4000 characters seems to be the critical length in my system.
This is problematic because network-admin always lumps in one single line all URLs contained in /etc/hosts which point to the same IP, leading to unmanageably long lines, thus causing the aforementioned line of code to segfault. Of course, it shouldn't segfault even in that case, but due to the behaviour of network-admin, this is hardly avoidable.

Perhaps this should be considered a bug in both getaddrinfo and network-admin?