Red Hat Bugzilla – Bug 4942
SIGILL for host, nslookup, named, and the like on i386 NOT i486
Last modified: 2008-05-01 11:37:51 EDT
I'll provide more detailed info, if necessary, but the
following shuold be enough to reproduce the bug...
I've installed RHL6.0 on a 486 and then moved the disk
(old ~500Mb IDE) to a 386 system (32Mb of RAM). Everything
is ok, except DNS related stuff, named, host, nslookup...
Name resolution for commands like telnet and ping works.
But host terminates with SIGILL even before showing its
usage. A strace shows that it fails before opening and
reading /etc/resolv.conf. Removing it cures the SIGILL
problem, but of course after that, name resolution is gone.
The same is true for nslookup. On a 486 or Pentium (K5)
everything works just fine. I've tried also to reinstall
from scratch (on the 486, as before), and the new system
shows exactly the same bug when moved to the 386. The 386
system is one of our nameserves which is had been
running 5.2 (and 5.1 before that) without problems (it is
running 5.2 right now, BTW). I moved the disk to another
386 (a completely different system), same results. It seems
the there's a piece of code that is not i386 friendly
sitting in glibc-2.1.1-6. I'll try and find if any other
executable is affected...
bind (and ~8 other packages IIRC) were poisoned by a change in the
definitions generated when invoked with "-m486". The change, defining
__i486__, caused the inline assembly for ntohl/ntohs to use an i486
instruction that is illegal on i386 to be compiled in. The problem is
(or will be) fixed in the compiler. Meanwhile, recompile bind (and
other packages) from src.rpm's making sure that rpm optflags does not
Here's the list of affected packages:
Here's the script (from Alan Cox) that was used to detect "poisoned"
for i in $*; do
echo -n $i
case "$X" in
(objdump --disassemble $i 2>/dev/null)|grep
if [ -s /tmp/x1 ]; then
echo " contaminated"
echo " ok"
echo " not ELF"