BusyBox Bug and Patch Tracking
BusyBox
  

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0000480 [uClibc] Architecture Specific major always 10-11-05 08:48 01-05-06 19:07
Reporter alain k View Status public  
Assigned To uClibc
Priority normal Resolution fixed  
Status closed   Product Version 0.9.28
Summary 0000480: On Mips, returning from a signal handler crashes the application
Description On Mips, program segfaults when returning from a signal handler.

The reason of this seems to be the following code snippet (from libc/sysdeps/linux/mips/sigaction.c):

    if (act) {
    kact.k_sa_handler = act->sa_handler;
    memcpy (&kact.sa_mask, &act->sa_mask, sizeof (kact.sa_mask));
    kact.sa_flags = act->sa_flags;

    kact.sa_flags = act->sa_flags | SA_RESTORER;
#ifdef HAVE_SA_RESTORER
    kact.sa_restorer = act->sa_restorer;
#endif
    }

This erroneously sets the SA_RESTORER unconditionnally, even if the application didn't request it. Result: on return from the signal handler, an uninitialized restorer is invoked, crashing the program.

Commenting out the offending line (kact.sa_flags = act->sa_flags | SA_RESTORER;) fixes the problem
Additional Information
Attached Files

- Relationships

- Notes
(0000860)
vapier
01-05-06 19:07

mjn3 has updated that code so it no longer sets SA_RESTORER all the time
 

- Issue History
Date Modified Username Field Change
10-11-05 08:48 alain k New Issue
10-11-05 08:48 alain k Status new => assigned
10-11-05 08:48 alain k Assigned To  => uClibc
01-05-06 19:07 vapier Note Added: 0000860
01-05-06 19:07 vapier Status assigned => closed
01-05-06 19:07 vapier Resolution open => fixed
04-08-06 10:09 hsudek Issue Monitored: hsudek
09-23-07 00:19 comio Issue Monitored: comio


Copyright © 2000 - 2006 Mantis Group
Powered by Mantis Bugtracker