[OpenIndiana-discuss] Bash bug issue
bruce.lilly at gmail.com
Mon Nov 3 21:39:10 UTC 2014
On Sat, Oct 4, 2014 at 11:05 AM, cpforum <cpforum at orange.fr> wrote:
> cd /usr/bin
> mv bash bash-oi_151a9
> ln -s /usr/local/bin/bash bash
While that would be reasonable under many operating systems, it *may*
present problems on Solaris-derived systems, especially 64-bit systems.
See http://docs.oracle.com/cd/E18752_01/html/816-5138/index.html (a bit
dated w.r.t. compiler flags, but the principles are still valid, as is most
of the content).
Note in particular that /usr/bin/bash *might* very well be a hard link to
/usr/lib/isaexec and that the real executables *might* live under
/usr/bin/i86pc and /usr/bin/amd64 (on i86 hardware of course).
It would be prudent to check first before moving and/or linking files in
/bin, /usr/bin, /usr/sbin, /usr/lib, ...
Actual conditions depend on whether or not the packager paid any attention
to 32-bit vs. 64-bit issues, and isn't bash-specific.
As of this late date, /usr/bin/bash here is in fact the bash executable,
not a link; but that means that it's 32-bit only and might well present
unexpected issues on 64-bit systems when dealing with large files etc.
(basically anything that involves pointers, long integers, time_t,
ptrdiff_t, clock_t, dev_t, off_t, size_t, or ssize_t in the sources).
If you are building from source on a 64-bit system, I strongly recommend
reading that document.
Note that for ksh, the situation described in the 64-bit Solaris
Developer's Guide applies:
#: isainfo -v
64-bit amd64 applications
cx16 sse3 sse2 sse fxsr mmx cmov amd_sysc cx8 tsc fpu
32-bit i386 applications
ahf cx16 sse3 sse2 sse fxsr mmx cmov sep cx8 tsc fpu
#: ls -l /bin/ksh* /usr/bin/ksh* /bin/*/ksh* /usr/bin/*/ksh*
-r-xr-xr-x 4 root bin 9712 2013-07-21 10:35 /bin/amd64/ksh
-r-xr-xr-x 4 root bin 9712 2013-07-21 10:35 /bin/amd64/ksh93
-r-xr-xr-x 4 root bin 8064 2013-07-21 10:35 /bin/i86/ksh
-r-xr-xr-x 4 root bin 8064 2013-07-21 10:35 /bin/i86/ksh93
-r-xr-xr-x 87 root bin 8064 2013-07-21 10:35 /bin/ksh
-r-xr-xr-x 87 root bin 8064 2013-07-21 10:35 /bin/ksh93
-r-xr-xr-x 4 root bin 9712 2013-07-21 10:35 /usr/bin/amd64/ksh
-r-xr-xr-x 4 root bin 9712 2013-07-21 10:35 /usr/bin/amd64/ksh93
-r-xr-xr-x 4 root bin 8064 2013-07-21 10:35 /usr/bin/i86/ksh
-r-xr-xr-x 4 root bin 8064 2013-07-21 10:35 /usr/bin/i86/ksh93
-r-xr-xr-x 87 root bin 8064 2013-07-21 10:35 /usr/bin/ksh
-r-xr-xr-x 87 root bin 8064 2013-07-21 10:35 /usr/bin/ksh93
-r-xr-xr-x 87 root bin 8064 2013-07-21 10:35 /usr/lib/isaexec
This topic appears not to be addressed adequately on the OpenIndiana wiki
(certainly no mention under Compiling+software+on+OpenIndiana) or the
illumos site (certainly no mention under Building+illumos+and+OpenIndiana
there). It seems to be something one either knows about or not (I stumbled
upon it while researching why uname -m and uname -p returns the same values
on 32-bit and 64-bit installations (and is therefore useless in determining
whether the installation is 32- or 64-bit), and why all of the executables
in /bin (etc) are 32-bit applications on my 64-bit systems, and why all
executables built on my 64-bit systems are 32-bit executables when built
using default compilation flags -- all of those being unexpected).
More information about the openindiana-discuss