1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
commit 8189e0be69cc063844214e4363f5acb28fa2aad0
author: prettyboy
date: 2020-05-28T16:23:43+03:00
revision: 6880919
Use faulthandler in the run_test to dump extra info in case of receiving term signal
issue:DEVTOOLSSUPPORT-1110
REVIEW: 1279410
--- contrib/deprecated/python/faulthandler/faulthandler.c (97a2dfa5400dd696c5eff33a9faa46526011a0ac)
+++ contrib/deprecated/python/faulthandler/faulthandler.c (8189e0be69cc063844214e4363f5acb28fa2aad0)
@@ -117,6 +117,13 @@ static user_signal_t *user_signals;
static void faulthandler_user(int signum);
#endif /* FAULTHANDLER_USER */
+#ifndef SI_KERNEL
+#define SI_KERNEL 0x80
+#endif
+
+#ifndef SI_TKILL
+#define SI_TKILL -6
+#endif
static fault_handler_t faulthandler_handlers[] = {
#ifdef SIGBUS
@@ -409,6 +416,7 @@ read_proc_exe(pid_t pid, char* buff, size_t len) {
}
}
+#ifdef HAVE_SIGACTION
static void
faulthandler_fatal_error_siginfo(int signum, siginfo_t* siginfo, void* ctx)
{
@@ -454,6 +462,7 @@ faulthandler_fatal_error_siginfo(int signum, siginfo_t* siginfo, void* ctx)
errno = save_errno;
}
+#endif
#ifdef MS_WINDOWS
extern void _Py_dump_hexadecimal(int fd, unsigned long value, size_t bytes);
|