bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Bug in Bash 2.05b when cross-compiling for MIPS.


From: Dylan Griffiths
Subject: Bug in Bash 2.05b when cross-compiling for MIPS.
Date: Fri, 17 Jun 2005 13:22:46 -0600
User-agent: Mozilla Thunderbird 1.0.2 (X11/20050317)

* The version number of Bash: Bash 2.05b, but bash 2.x and 3.x are both likely affected.
    * The hardware and operating system: HOST Linux x86, TARGET Linux MIPS
    * The compiler used to compile Bash: mips-gcc (GCC) 3.2
* A description of the bug behaviour: $(CC_FOR_HOST) is used to compile mksignames.c, which produces signames.h. Signames.h reflects the names and ordering of signals on the host machine, not the target machine. * A short script or `recipe' which exercises the bug and may be used to reproduce it: simply cross-compile bash for any target arch which does not share 100% the same signals. Examples inlcude: Alpha and x86, Mips and x86, ARM and x86, etc.

How to fix? Well, it may be that signal.h in glibc needs to be expanded to define all signals on all Linux systems, and wrap with ifdefs, and then compile (for host, but using the apropos define) mksigname such that it outputs the correct target signames.h. Another solution would be some alternative method for generating a correct signals.h.

Here is some example output of how the bash kill command generates incorrect signals on a MIPS platform:

# ./testsig &
65
# kill -USR1 65
Caught signal 16
# kill 65
Caught signal 15
# bash
bash-2.05b#
bash-2.05b# kill -USR1 65
Caught signal 10
bash-2.05b# exit
#




reply via email to

[Prev in Thread] Current Thread [Next in Thread]