Skip to content

Commit 671939e

Browse files
vstinnerAA-Turner
authored andcommitted
pythongh-137725: Convert faulthandler to Argument Clinic (python#137726)
Co-authored-by: Adam Turner <[email protected]>
1 parent c8507f4 commit 671939e

File tree

7 files changed

+956
-154
lines changed

7 files changed

+956
-154
lines changed

Include/internal/pycore_global_objects_fini_generated.h

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Include/internal/pycore_global_strings.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -327,6 +327,7 @@ struct _Py_global_strings {
327327
STRUCT_FOR_ID(c_exception)
328328
STRUCT_FOR_ID(c_parameter_type)
329329
STRUCT_FOR_ID(c_return)
330+
STRUCT_FOR_ID(c_stack)
330331
STRUCT_FOR_ID(cached_datetime_module)
331332
STRUCT_FOR_ID(cached_statements)
332333
STRUCT_FOR_ID(cadata)
@@ -341,6 +342,7 @@ struct _Py_global_strings {
341342
STRUCT_FOR_ID(category)
342343
STRUCT_FOR_ID(cb_type)
343344
STRUCT_FOR_ID(certfile)
345+
STRUCT_FOR_ID(chain)
344346
STRUCT_FOR_ID(check_same_thread)
345347
STRUCT_FOR_ID(clear)
346348
STRUCT_FOR_ID(close)
@@ -435,6 +437,7 @@ struct _Py_global_strings {
435437
STRUCT_FOR_ID(excepthook)
436438
STRUCT_FOR_ID(exception)
437439
STRUCT_FOR_ID(existing_file_name)
440+
STRUCT_FOR_ID(exit)
438441
STRUCT_FOR_ID(exp)
439442
STRUCT_FOR_ID(expression)
440443
STRUCT_FOR_ID(extend)
@@ -695,6 +698,7 @@ struct _Py_global_strings {
695698
STRUCT_FOR_ID(rel_tol)
696699
STRUCT_FOR_ID(release)
697700
STRUCT_FOR_ID(reload)
701+
STRUCT_FOR_ID(repeat)
698702
STRUCT_FOR_ID(repl)
699703
STRUCT_FOR_ID(replace)
700704
STRUCT_FOR_ID(reqrefs)
@@ -733,6 +737,7 @@ struct _Py_global_strings {
733737
STRUCT_FOR_ID(shared)
734738
STRUCT_FOR_ID(show_cmd)
735739
STRUCT_FOR_ID(signed)
740+
STRUCT_FOR_ID(signum)
736741
STRUCT_FOR_ID(size)
737742
STRUCT_FOR_ID(sizehint)
738743
STRUCT_FOR_ID(skip_file_prefixes)

Include/internal/pycore_runtime_init_generated.h

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Include/internal/pycore_unicodeobject_generated.h

Lines changed: 20 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Lib/test/test_faulthandler.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -360,6 +360,17 @@ def test_enable_single_thread(self):
360360
'Segmentation fault',
361361
all_threads=False)
362362

363+
@skip_segfault_on_android
364+
def test_enable_without_c_stack(self):
365+
self.check_fatal_error("""
366+
import faulthandler
367+
faulthandler.enable(c_stack=False)
368+
faulthandler._sigsegv()
369+
""",
370+
3,
371+
'Segmentation fault',
372+
c_stack=False)
373+
363374
@skip_segfault_on_android
364375
def test_disable(self):
365376
code = """

0 commit comments

Comments
 (0)