1
0
mirror of https://github.com/openbsd/src.git synced 2024-12-22 16:42:56 -08:00

Deliver SIGTRAP, rather than SIGEMT, for trap instructions which are neither

debugger breakpoints nor compiler-generated divide by zero reports.

SIGEMT is a historical curiosity which makes no sense nowadays except on
PDP-11 and VAX hardware.

Discussed with imp@ and visa@ long ago.
This commit is contained in:
miod 2024-10-16 18:40:52 +00:00
parent 21537d4178
commit 60ddae46be

View File

@ -1,4 +1,4 @@
/* $OpenBSD: trap.c,v 1.172 2024/09/20 02:00:46 jsg Exp $ */ /* $OpenBSD: trap.c,v 1.173 2024/10/16 18:40:52 miod Exp $ */
/* /*
* Copyright (c) 1988 University of Utah. * Copyright (c) 1988 University of Utah.
@ -645,8 +645,8 @@ fault_common_no_miss:
sigexit(p, SIGABRT); sigexit(p, SIGABRT);
/* NOTREACHED */ /* NOTREACHED */
} else { } else {
signal = SIGEMT; /* Stuff it with something for now */ signal = SIGTRAP;
sicode = 0; sicode = TRAP_BRKPT;
} }
break; break;
} }