This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug network/19791] res_query.c:262 asserts when dns contains unreachable entries


https://sourceware.org/bugzilla/show_bug.cgi?id=19791

--- Comment #5 from Florian Weimer <fweimer at redhat dot com> ---
(In reply to priyesh from comment #4)
> (In reply to Florian Weimer from comment #3)
> Florian, 
> i got the sources here: http://ftp.gnu.org/gnu/glibc/glibc-2.23.tar.gz. 
> I verified that line 262 in resolv/res_query.c had the assert
> 261        /* Make sure both hp and hp2 are defined */
> 262        assert((hp != NULL) && (hp2 != NULL));
> 
> Am i missing something?

Older glibc versions perform macro-expansion on the expression being asserted. 
This results in the message you quoted originally:

res_query.c:262: __libc_res_nquery: Assertion `(hp != ((void *)0)) && (hp2 !=
((void *)0))' failed.

Look how it says â((void *)0)â instead of âNULLâ.  glibc 2.23 will print the
original expression instead because it incorporates commit
8ba14398e629c1f63b9c91a59a47a713b3cce8bc.  This is why the quoted assertion
message cannot come from a binary derived from glibc 2.23.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]