Opened 5 years ago

Closed 5 years ago

#86 closed defect (fixed)

Dioscc produces a broken gzip binary

Reported by: Lukáš Zaoral Owned by: mornfall
Priority: major Milestone: 4.3
Component: divcc Keywords:
Cc: kdudka@…, jamartis@…, lzaoral@…


last few releases of dioscc produce a broken native binary of gzip 1.10, that crashes with a segmentation fault. The problematic part of gzip code can be reduced to the following example, that fails in the same manner.

In my opinion, the DiOS implementation of struct sigaction in signal.h is probably the cause of this problem. I'm using glibc 2.29.


#include <signal.h>
#include <stddef.h>

int main(void)
    struct sigaction act;
    sigaction(SIGINT, NULL, &act);

Change History (3)

comment:1 Changed 5 years ago by Lukáš Zaoral

I forgot to mention, that the problem occurs only when gzip is compiled with -O0 or -O1 flags. However, the code snippet above fails regardless of level of optimisation.

comment:2 Changed 5 years ago by mornfall

Owner: changed from blurrymoi to mornfall
Status: newaccepted

Yes, you are right. We need to extend to deal with the layout of struct sigaction. Which is going to be fun because of the union that glibc uses there.

comment:3 Changed 5 years ago by mornfall

Resolution: fixed
Status: acceptedclosed

Actually, the fix was easier than I expected and just made it into next.

Note: See TracTickets for help on using tickets.