Skip to content

Conversation

@vstinner
Copy link
Member

@vstinner vstinner commented Mar 19, 2020

  • Add eval_frame_handle_pending() helper function: cold code path.
  • Fix PyEval_ReleaseLock(): don't dereference tstate if it's NULL.

https://bugs.python.org/issue40010

@vstinner
Copy link
Member Author

Hum, https://bugs.python.org/issue39877 strikes back. One more time.

I wrote PR #19080 to fix crashes.

@vstinner
Copy link
Member Author

I merged PR #19080. I rebased this PR on top of it.

@vstinner
Copy link
Member Author

Oh, test_gdb failed on Travis CI beause gdb fails to get some Python frames: (frame information optimized out). Example of error:

AssertionError: 'Breakpoint 1 at 0x5aabf1: file Python/bltinmodule.c, line 1173.
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".

Breakpoint 1, builtin_id (self=, v=42) at Python/bltinmodule.c:1173
1173\t    PyObject *id = PyLong_FromVoidPtr(v);
Traceback (most recent call first):
  <built-in method id of module object at remote 0x7ffff7f87050>
  (frame information optimized out)
  File "/home/travis/build/python/cpython/Lib/test/gdb_sample.py", line 7, in bar
    baz(a, b, c)
  File "/home/travis/build/python/cpython/Lib/test/gdb_sample.py", line 4, in foo
    bar(a, b, c)
  (frame information optimized out)
'

did not match 

'^.*
Traceback \\(most recent call first\\):
  <built-in method id of module object .*>
  File ".*gdb_sample.py", line 10, in baz
    id\\(42\\)
  File ".*gdb_sample.py", line 7, in bar
    baz\\(a, b, c\\)
  File ".*gdb_sample.py", line 4, in foo
    bar\\(a, b, c\\)
  File ".*gdb_sample.py", line 12, in <module>
    foo\\(1, 2, 3\\)
'

@vstinner
Copy link
Member Author

Oh, test_gdb failed on Travis CI beause gdb fails to get some Python frames: (frame information optimized out).

I created https://bugs.python.org/issue40019 to fix this issue.

I added PR #19081 commit to this PR to test if PR #19081 fix https://bugs.python.org/issue40019.

* Add eval_frame_handle_pending() helper function: cold code path.
* Fix PyEval_ReleaseLock(): don't dereference tstate if it's NULL.
@vstinner vstinner merged commit da2914d into python:master Mar 20, 2020
@vstinner vstinner deleted the eval_frame_handle_pending branch March 20, 2020 08:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants