Skip to content

gh-149342: _remote_debugging: Fix binary profile corruption when sampling a (temporarily) empty stack#149343

Merged
pablogsal merged 12 commits intopython:mainfrom
maurycy:remote-debugger-empty-stack-exc
May 5, 2026
Merged

gh-149342: _remote_debugging: Fix binary profile corruption when sampling a (temporarily) empty stack#149343
pablogsal merged 12 commits intopython:mainfrom
maurycy:remote-debugger-empty-stack-exc

Conversation

@maurycy
Copy link
Copy Markdown
Contributor

@maurycy maurycy commented May 4, 2026

My understanding is that an empty stack is a bit racy but perfectly valid?

Closes #149342

Comment thread Modules/_remote_debugging/binary_io_writer.c
@read-the-docs-community
Copy link
Copy Markdown

read-the-docs-community Bot commented May 4, 2026

Comment thread Modules/_remote_debugging/module.c Outdated
@maurycy maurycy requested a review from pablogsal May 4, 2026 11:07
Comment thread Modules/_remote_debugging/module.c
@pablogsal pablogsal enabled auto-merge (squash) May 4, 2026 22:27
Copy link
Copy Markdown
Member

@pablogsal pablogsal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pushed a bunch of fixes but LGTM

@maurycy great job! 💪

maurycy and others added 12 commits May 5, 2026 01:01
```
Objects/descrobject.c:194:16: runtime error: call to function BinaryWriter_get_total_samples through pointer to incorrect function type 'struct _object *(*)(struct _object *, void *)'
/home/maurycy/cpython/./Modules/_remote_debugging/module.c:1660: note: BinaryWriter_get_total_samples defined here
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior Objects/descrobject.c:194:16
```

https://github.com/python/cpython/actions/runs/25297636845/job/74159079502
@pablogsal pablogsal force-pushed the remote-debugger-empty-stack-exc branch from 19586a0 to 913b5c7 Compare May 5, 2026 00:04
@pablogsal pablogsal merged commit 6f8c964 into python:main May 5, 2026
55 checks passed
@maurycy maurycy deleted the remote-debugger-empty-stack-exc branch May 5, 2026 08:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

_remote_debugging: Invalid RLE count XXX exceeds maximum possible XXX for remaining data

2 participants