Broken dietlibc-signalhandling with recent FC2 kernel

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

 



Hello,

the following small program segfaults on the latest FC2 kernel:

| #include <signal.h>
| void handler(int s) {}
| int main()
| {
|   signal(SIGUSR1, handler);
|   kill(getpid(), SIGUSR1);
| }

| $ diet gcc test.c -Wa,--execstack -Wl,-z,execstack
| $ strace /tmp/a.out
| execve("/tmp/a.out", ["/tmp/a.out"], [/* 27 vars */]) = 0
| rt_sigaction(SIGUSR1, {0x80480d4, [USR1], SA_NOMASK}, {SIG_DFL}, 8) = 0
| getpid()                                = 736
| kill(736, SIGUSR1)                      = 0
| --- SIGUSR1 (User defined signal 1) @ 0 (0) ---
| --- SIGSEGV (Segmentation fault) @ 0 (0) ---
| +++ killed by SIGSEGV +++



Things are fine with:
* the latest stable kernel (2.4.27),
* the FC1 kernels,
* the FC2 kernel 2.6.7-1.494.2.2,
* the vanilla 2.6.8.1 kernel.

where I get the expected

| execve("/home/ensc/tmp/a.out", ["/home/ensc/tmp/a.out"], [/* 43 vars */]) = 0
| rt_sigaction(SIGUSR1, {0x80480d4, [USR1], SA_NOMASK}, {SIG_DFL}, 8) = 0
| getpid()                                = 22642
| kill(22642, SIGUSR1)                    = 0
| --- SIGUSR1 (User defined signal 1) @ 0 (0) ---
| sigreturn()                             = ? (mask now [])
| _exit(0)                                = ?


The segfault has been seen on the 2.6.8-1.521 kernel only; rawhide kernels
were not tested yet. Tricks like executing through 'setarch i386', with
'LD_ASSUME_KERNEL=2.2.5', putting '0' into /proc/sys/kernel/exec-shield' or
removing the '-W[al]' options above do not help. Issue has been verified
with both the shipped dietlibc-0.24-4 and a vanilla dietlibc-0.27.

Am I missing a way how I can use dietlibc with FC2?




Enrico


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux