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

Re: [MiNT] Signal on Memory volation

Hello Helmut,

Exemple work fine, I have done several tests, and I have replace by direct gemdos Psignal() and it work fine too. Finaly I understand my mistake, I want to add signal handler inside AES to manage crash in gem application for debug, so I install handler, unfortunately the handler is in protected area of AES in supervisor so in fact I have double bus error one from the application the second one from the signal handler itself, Mint doesn't like this case and freeze if I try to kill the application, the system is in panic. Interesting case.


Am 14.09.2014, 18:47 Uhr, schrieb OL:

I have look a bit in Mint source code.

I not understand all but it look that form_alert() not come from
mintsetter but from mint itself in the function report_buserr()

My problem is if there is this error, the program is not killed but
look frozen, system still work, but if I want kill this program, the
whole system freeze.

#include <stdio.h>
#include <stdlib.h>
#include <signal.h>

void *sigh( int sig )
  printf( "signal %d\n", sig );
int main(void)
  long *x = 0xff0033;
  int sig;
  for( sig = 0; sig < 31; sig++ )
    signal( sig, (__Sigfunc)sigh );
  *x = 4;
  return 0;

I get:

signal 10

Which would be a bus-error ...

Without the handler it is a memory-violation:

19:54:27: PROCESS "memv" KILLED: MEMORY VIOLATION. (PID 034) Type:
hardware PC: 0172214C Addr: 00FF0033 BP: 01722000 OS: 0000004C

In any case the system continues.

I never use mintsetter or anything like that.
It's also possible your program destroyed the system before the
memory-violation is noticed.