Skip to content

Commit 5821e1b

Browse files
committed
Merge branch 'master' into ac-decimal/73487-pt2
2 parents c01448e + eac37b4 commit 5821e1b

File tree

11 files changed

+972
-170
lines changed

11 files changed

+972
-170
lines changed

Doc/howto/remote_debugging.rst

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -374,13 +374,13 @@ To locate a thread:
374374
reliable thread to target.
375375

376376
3. Optionally, use the offset ``interpreter_state.threads_head`` to iterate
377-
through the linked list of all thread states. Each ``PyThreadState`` structure
378-
contains a ``native_thread_id`` field, which may be compared to a target thread
379-
ID to find a specific thread.
377+
through the linked list of all thread states. Each ``PyThreadState``
378+
structure contains a ``native_thread_id`` field, which may be compared to
379+
a target thread ID to find a specific thread.
380380

381-
1. Once a valid ``PyThreadState`` has been found, its address can be used in
382-
later steps of the protocol, such as writing debugger control fields and
383-
scheduling execution.
381+
4. Once a valid ``PyThreadState`` has been found, its address can be used in
382+
later steps of the protocol, such as writing debugger control fields and
383+
scheduling execution.
384384

385385
The following is an example implementation that locates the main thread state::
386386

@@ -454,15 +454,15 @@ its fields are defined by the ``_Py_DebugOffsets`` structure and include the
454454
following:
455455

456456
- ``debugger_script_path``: A fixed-size buffer that holds the full path to a
457-
Python source file (``.py``). This file must be accessible and readable by
458-
the target process when execution is triggered.
457+
Python source file (``.py``). This file must be accessible and readable by
458+
the target process when execution is triggered.
459459

460460
- ``debugger_pending_call``: An integer flag. Setting this to ``1`` tells the
461-
interpreter that a script is ready to be executed.
461+
interpreter that a script is ready to be executed.
462462

463463
- ``eval_breaker``: A field checked by the interpreter during execution.
464-
Setting bit 5 (``_PY_EVAL_PLEASE_STOP_BIT``, value ``1U << 5``) in this
465-
field causes the interpreter to pause and check for debugger activity.
464+
Setting bit 5 (``_PY_EVAL_PLEASE_STOP_BIT``, value ``1U << 5``) in this
465+
field causes the interpreter to pause and check for debugger activity.
466466

467467
To complete the injection, the debugger must perform the following steps:
468468

Doc/library/asyncio-protocol.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -390,11 +390,11 @@ Subprocess Transports
390390
Return the transport for the communication pipe corresponding to the
391391
integer file descriptor *fd*:
392392

393-
* ``0``: readable streaming transport of the standard input (*stdin*),
393+
* ``0``: writable streaming transport of the standard input (*stdin*),
394394
or :const:`None` if the subprocess was not created with ``stdin=PIPE``
395-
* ``1``: writable streaming transport of the standard output (*stdout*),
395+
* ``1``: readable streaming transport of the standard output (*stdout*),
396396
or :const:`None` if the subprocess was not created with ``stdout=PIPE``
397-
* ``2``: writable streaming transport of the standard error (*stderr*),
397+
* ``2``: readable streaming transport of the standard error (*stderr*),
398398
or :const:`None` if the subprocess was not created with ``stderr=PIPE``
399399
* other *fd*: :const:`None`
400400

Doc/library/asyncio-sync.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ Event
157157

158158
Clear (unset) the event.
159159

160-
Tasks awaiting on :meth:`~Event.wait` will now block until the
160+
Subsequent tasks awaiting on :meth:`~Event.wait` will now block until the
161161
:meth:`~Event.set` method is called again.
162162

163163
.. method:: is_set()

Doc/library/profile.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -791,7 +791,7 @@ Analysis of the profiler data is done using the :class:`~pstats.Stats` class.
791791
significant entries. Initially, the list is taken to be the complete set
792792
of profiled functions. Each restriction is either an integer (to select a
793793
count of lines), or a decimal fraction between 0.0 and 1.0 inclusive (to
794-
select a percentage of lines), or a string that will interpreted as a
794+
select a percentage of lines), or a string that will be interpreted as a
795795
regular expression (to pattern match the standard name that is printed).
796796
If several restrictions are provided, then they are applied sequentially.
797797
For example::

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
@@ -329,6 +329,7 @@ struct _Py_global_strings {
329329
STRUCT_FOR_ID(c_exception)
330330
STRUCT_FOR_ID(c_parameter_type)
331331
STRUCT_FOR_ID(c_return)
332+
STRUCT_FOR_ID(c_stack)
332333
STRUCT_FOR_ID(cached_datetime_module)
333334
STRUCT_FOR_ID(cached_statements)
334335
STRUCT_FOR_ID(cadata)
@@ -344,6 +345,7 @@ struct _Py_global_strings {
344345
STRUCT_FOR_ID(category)
345346
STRUCT_FOR_ID(cb_type)
346347
STRUCT_FOR_ID(certfile)
348+
STRUCT_FOR_ID(chain)
347349
STRUCT_FOR_ID(check_same_thread)
348350
STRUCT_FOR_ID(clamp)
349351
STRUCT_FOR_ID(clear)
@@ -440,6 +442,7 @@ struct _Py_global_strings {
440442
STRUCT_FOR_ID(excepthook)
441443
STRUCT_FOR_ID(exception)
442444
STRUCT_FOR_ID(existing_file_name)
445+
STRUCT_FOR_ID(exit)
443446
STRUCT_FOR_ID(exp)
444447
STRUCT_FOR_ID(expression)
445448
STRUCT_FOR_ID(extend)
@@ -704,6 +707,7 @@ struct _Py_global_strings {
704707
STRUCT_FOR_ID(rel_tol)
705708
STRUCT_FOR_ID(release)
706709
STRUCT_FOR_ID(reload)
710+
STRUCT_FOR_ID(repeat)
707711
STRUCT_FOR_ID(repl)
708712
STRUCT_FOR_ID(replace)
709713
STRUCT_FOR_ID(reqrefs)
@@ -742,6 +746,7 @@ struct _Py_global_strings {
742746
STRUCT_FOR_ID(shared)
743747
STRUCT_FOR_ID(show_cmd)
744748
STRUCT_FOR_ID(signed)
749+
STRUCT_FOR_ID(signum)
745750
STRUCT_FOR_ID(size)
746751
STRUCT_FOR_ID(sizehint)
747752
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)