Skip to content

gh-153838: Skip non-regular source files in the heatmap exporter - #153839

Merged
pablogsal merged 4 commits into
python:mainfrom
tonghuaroot:heatmap-confine-source-reads
Oct 5, 2026
Merged

pablogsal merged 4 commits into
python:mainfrom
tonghuaroot:heatmap-confine-source-reads

Conversation

@tonghuaroot

@tonghuaroot tonghuaroot commented Jul 17, 2026 •

Copy link
Copy Markdown
Contributor

The heatmap exporter can hang or read indefinitely when a sampled filename points to a FIFO or device. Check that the source is a regular file before reading it and use the existing unavailable-source placeholder otherwise.

Tests require generated HTML and verify that missing files, directories, and FIFOs are never opened. Regular-file exports remain covered. There is no size cap, following the review discussion in #153838. The profiling test suite passes.

Closes #153838.

@bedevere-app bedevere-app Bot added the type-feature A feature request or enhancement label Oct 5, 2026
@pablogsal pablogsal changed the title gh-153838: Skip non-regular and oversized files in heatmap exporter gh-153838: Skip non-regular source files in the heatmap exporter Oct 5, 2026
@pablogsal pablogsal added the needs backport to 3.15 pre-release feature fixes, bugs and security fixes label Oct 5, 2026
@pablogsal
pablogsal enabled auto-merge (squash) October 5, 2026 14:07
@bedevere-app

bedevere-app Bot commented Oct 5, 2026

Copy link
Copy Markdown

GH-158853 is a backport of this pull request to the 3.15 branch.

@pablogsal
pablogsal merged commit 7226870 into python:main Oct 5, 2026
102 of 107 checks passed
@pablogsal pablogsal added type-bug An unexpected behavior, bug, or error and removed type-feature A feature request or enhancement labels Oct 5, 2026
pablogsal added a commit that referenced this pull request Oct 5, 2026
…er (GH-153839) (#158853)

Backport of GH-153839.

Co-authored-by: tonghuaroot <tonghuaroot@gmail.com>
pablogsal added a commit to pablogsal/cpython that referenced this pull request Oct 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type-bug An unexpected behavior, bug, or error

Projects

None yet

Development

Successfully merging this pull request may close these issues.

profiling.sampling heatmap reads non-regular and oversized files

2 participants