Subject | Hash | Author | Date (UTC) |
---|---|---|---|
faulthandler: Restore the old sigaltstack during teardown (#777) | 20fbf8accd494fd15b0fc4c84928178c71ead4d1 | Christophe Zeitouny | 2017-03-23 17:14:29 |
Use NULL rather than 0. (#778) | 0b3ec192259a65971001ce8f0de85a9c1e71d9c7 | Serhiy Storchaka | 2017-03-23 15:53:47 |
bpo-6532: Make the thread id an unsigned integer. (#781) | aefa7ebf0ff0f73feee7ab24f4cdcb2014d83ee5 | Serhiy Storchaka | 2017-03-23 13:48:39 |
bpo-29728: Provide socket.TCP_NOTSENT_LOWAT (#477) | 1e2147b9d75a64df370a9393c2b5b9d170dc0afd | Nathaniel J. Smith | 2017-03-23 03:56:55 |
Remove an outdated statement in execution model docs (GH-754) | fad7f1560669af1766c583c7ef242c55d8c8de41 | Ivan Levkivskyi | 2017-03-23 00:54:53 |
doc: minor fix for library/profile (GH-761) | bd3d8ba3b22da0bad018b53a3e6610ae03c5aa49 | INADA Naoki | 2017-03-22 07:56:36 |
fix function name in tabnanny documentation (GH-759) | 75b6cf879fab58c0576d5415eaf38d92bfd678ab | Jelle Zijlstra | 2017-03-22 06:53:57 |
bpo-29859: Fix error messages from return codes for pthread_* calls (GH-741) | d7fa6b259e00fca04dbf816bfcf4115fdda14bb7 | Daniel Birnstiel | 2017-03-21 13:06:06 |
bpo-29865: Use PyXXX_GET_SIZE macros rather than Py_SIZE for concrete types. (#748) | fff9a31a91283c39c363af219e595eab7d4da6f7 | Serhiy Storchaka | 2017-03-21 06:53:25 |
Don't use Py_SIZE for dict object. (#747) | c61ac1642d19f54c7b755098230967ad2e603180 | Serhiy Storchaka | 2017-03-21 06:52:38 |
bpo-27593: Revise git SCM build info. (#744) | 554626ada769abf82a5dabe6966afa4265acb6a6 | Ned Deily | 2017-03-21 03:41:52 |
bpo-29849: fix a memory leak in import_from (GH-712) | 4830f581af57dd305c02c1fd72299ecb5b090eca | Xiang Zhang | 2017-03-21 03:13:42 |
Fix "NotImplentedError" typo in constants documentation (#692) | 05f53735c8912f8df1077e897f052571e13c3496 | zertrin | 2017-03-20 12:24:39 |
bpo-20087: Revert "make the glibc alias table take precedence over the X11 one (#422)" (#713) | df8280838f52d6ec45ba03ef734b0dec8a9c43fb | Benjamin Peterson | 2017-03-20 06:49:43 |
bpo-28876: bool of large range raises OverflowError (#699) | e46fb8611867fa3b407a813f53137929b7cb4a10 | 4kir4 | 2017-03-20 06:44:46 |
bpo-29856: Fix typo in curses documentation (GH-730) | 64508780d72769e4c7afc67a511c057261c578f6 | Mariatta | 2017-03-20 03:48:04 |
bpo-29845: Mark tests that use _testcapi as CPython-only (#711) | 24c738a9e91b8f46da6166663d8ce7ec18cec784 | Serhiy Storchaka | 2017-03-19 18:20:10 |
bpo-29116: Fix error messages for concatenating bytes and bytearray with unsupported type. (#709) | 6b5a9ec4788770c652bac3bf5d5a0a3b710b82ae | Serhiy Storchaka | 2017-03-19 17:47:02 |
bpo-29116: Improve error message for concatenating str with non-str. (#710) | 004e03fb0c2febe2ec8afbd28ffcb3e980c63228 | Serhiy Storchaka | 2017-03-19 17:38:42 |
bpo-29748: Added the slice index converter in Argument Clinic. (#549) | 80ec8364f15857c405ef0ecb1e758c8fc6b332f7 | Serhiy Storchaka | 2017-03-19 17:37:40 |
File | Lines added | Lines deleted |
---|---|---|
Misc/ACKS | 1 | 0 |
Misc/NEWS | 3 | 0 |
Modules/faulthandler.c | 16 | 1 |
File Misc/ACKS changed (mode: 100644) (index c99aeaa335..2056efe8fb) | |||
... | ... | Artur Zaprzala | |
1716 | 1716 | Mike Zarnstorff | Mike Zarnstorff |
1717 | 1717 | Yury V. Zaytsev | Yury V. Zaytsev |
1718 | 1718 | Siebren van der Zee | Siebren van der Zee |
1719 | Christophe Zeitouny | ||
1719 | 1720 | Nickolai Zeldovich | Nickolai Zeldovich |
1720 | 1721 | Yuxiao Zeng | Yuxiao Zeng |
1721 | 1722 | Uwe Zessin | Uwe Zessin |
File Misc/NEWS changed (mode: 100644) (index 97c45d4776..8cc8b9f971) | |||
... | ... | Extension Modules | |
287 | 287 | Library | Library |
288 | 288 | ------- | ------- |
289 | 289 | ||
290 | - bpo-29884: faulthandler: Restore the old sigaltstack during teardown. | ||
291 | Patch by Christophe Zeitouny. | ||
292 | |||
290 | 293 | - bpo-25455: Fixed crashes in repr of recursive buffered file-like objects. | - bpo-25455: Fixed crashes in repr of recursive buffered file-like objects. |
291 | 294 | ||
292 | 295 | - bpo-29800: Fix crashes in partial.__repr__ if the keys of partial.keywords | - bpo-29800: Fix crashes in partial.__repr__ if the keys of partial.keywords |
File Modules/faulthandler.c changed (mode: 100644) (index 4a03eaf96a..fc9490d0d4) | |||
... | ... | static const size_t faulthandler_nsignals = \ | |
124 | 124 | ||
125 | 125 | #ifdef HAVE_SIGALTSTACK | #ifdef HAVE_SIGALTSTACK |
126 | 126 | static stack_t stack; | static stack_t stack; |
127 | static stack_t old_stack; | ||
127 | 128 | #endif | #endif |
128 | 129 | ||
129 | 130 | ||
... | ... | int _PyFaulthandler_Init(void) | |
1317 | 1318 | stack.ss_size = SIGSTKSZ; | stack.ss_size = SIGSTKSZ; |
1318 | 1319 | stack.ss_sp = PyMem_Malloc(stack.ss_size); | stack.ss_sp = PyMem_Malloc(stack.ss_size); |
1319 | 1320 | if (stack.ss_sp != NULL) { | if (stack.ss_sp != NULL) { |
1320 | err = sigaltstack(&stack, NULL); | ||
1321 | err = sigaltstack(&stack, &old_stack); | ||
1321 | 1322 | if (err) { | if (err) { |
1322 | 1323 | PyMem_Free(stack.ss_sp); | PyMem_Free(stack.ss_sp); |
1323 | 1324 | stack.ss_sp = NULL; | stack.ss_sp = NULL; |
... | ... | void _PyFaulthandler_Fini(void) | |
1373 | 1374 | faulthandler_disable(); | faulthandler_disable(); |
1374 | 1375 | #ifdef HAVE_SIGALTSTACK | #ifdef HAVE_SIGALTSTACK |
1375 | 1376 | if (stack.ss_sp != NULL) { | if (stack.ss_sp != NULL) { |
1377 | /* Fetch the current alt stack */ | ||
1378 | stack_t current_stack; | ||
1379 | if (sigaltstack(NULL, ¤t_stack) == 0) { | ||
1380 | if (current_stack.ss_sp == stack.ss_sp) { | ||
1381 | /* The current alt stack is the one that we installed. | ||
1382 | It is safe to restore the old stack that we found when | ||
1383 | we installed ours */ | ||
1384 | sigaltstack(&old_stack, NULL); | ||
1385 | } else { | ||
1386 | /* Someone switched to a different alt stack and didn't | ||
1387 | restore ours when they were done (if they're done). | ||
1388 | There's not much we can do in this unlikely case */ | ||
1389 | } | ||
1390 | } | ||
1376 | 1391 | PyMem_Free(stack.ss_sp); | PyMem_Free(stack.ss_sp); |
1377 | 1392 | stack.ss_sp = NULL; | stack.ss_sp = NULL; |
1378 | 1393 | } | } |