[klibc] klibc 2.0~rc3-1 ./. mksh 40.9.20120414-2

Thorsten Glaser tg at mirbsd.de
Fri Apr 20 09:01:32 PDT 2012


Hi,

after changing mksh to no longer use mkstemp, I decided to try
and build mksh-static with klcc on most platforms, in Debian.
Here are the results by Debian architecture:

alpha	(4) fails
amd64	works
armel	works
armhf	(3) fails
i386	works
ia64	works
m68k	(1) workaround
mips	works
mipsel	works
powerpc	(2) fails
ppc64	works (!)
s390	works
s390x	works
sparc	works

Architectures not listed either do not have a working klibc 2.0~rc3,
or did not build mksh or one of its dependencies due to issues with
the port (such as debhelper being uninstallable), or do not have a
Linux kernel.

The ssize_t prototype is bogus at least on s390:
../../shf.c:453:3: warning: format '%zd' expects argument of type 'signed size_t', but argument 4 has type 'ssize_t' [-Wformat]
That is not a problem, though.

(1) m68k: fails, unless I do *not* add -O2 or -Os to CFLAGS
    and do always add -g (might be a toolchain bug?); this
    workaround was added to the Debian mksh source package

https://buildd.debian.org/status/fetch.php?pkg=mksh&arch=powerpc&ver=40.9.20120414-2&stamp=1334431629
(2) powerpc: amazingly, ppc64 does NOT fail… this looks like
    m68k without the above-mentioned workaround: the failure
    I already saw often: after running an external programme,
    control flow does not return to the shell, and the child
    is not cleaned up (sticks around as zombie); might be a
    signal delivery problem (SIGCHLD), signal mask stuff, etc.

https://buildd.debian.org/status/fetch.php?pkg=mksh&arch=armhf&ver=40.9.20120414-2&stamp=1334433386
(3) armhf: one of the tests has the memory pool allocator
    error out as one of its internal data structures got
    corrupted, or a wrong pointer passed to aresize/afree

http://buildd.debian-ports.org/status/fetch.php?pkg=mksh&arch=alpha&ver=40.9.20120414-2&stamp=1334504721
(4) alpha: random SIGSEGVs that happen with neither eglibc
    nor dietlibc so almost certainly (considering mksh also
    runs with other OSes on DEC Alpha systems, even with
    the Compaq C compiler) are problems in klibc


If someone wants to have a stab at these: there are Debian
porterboxen around for at least powerpc and armhf; alpha
might one get access to; for m68k, there is an up-to-date
(April 2012) VM base image and I can give instructions how
to run the VM. Since the failures happen when executing
certain shell code, tracking them down to C code is very
difficult; the gdb way (or printf debugging, well, use
shellf() inside mksh code instead) might be easier.

bye,
//mirabilos
-- 
I believe no one can invent an algorithm. One just happens to hit upon it
when God enlightens him. Or only God invents algorithms, we merely copy them.
If you don't believe in God, just consider God as Nature if you won't deny
existence.		-- Coywolf Qi Hunt



More information about the klibc mailing list