Skip to content

fix: crash calling OSR shared texture release() after texture GC'd#50501

Merged
MarshallOfSound merged 1 commit into41-x-yfrom
trop/41-x-y-bp-fix-crash-calling-osr-shared-texture-release-after-texture-gc-d-1774461055154
Mar 26, 2026
Merged

fix: crash calling OSR shared texture release() after texture GC'd#50501
MarshallOfSound merged 1 commit into41-x-yfrom
trop/41-x-y-bp-fix-crash-calling-osr-shared-texture-release-after-texture-gc-d-1774461055154

Conversation

@trop
Copy link
Copy Markdown
Contributor

@trop trop bot commented Mar 25, 2026

Backport of #50473

See that PR for details.

Notes: Fixed a crash when calling an offscreen shared texture's release() after the texture object was garbage collected.

The weak persistent tracking the OffscreenReleaseHolderMonitor was tied
to the texture object, but the release() closure holds a raw pointer to
the monitor via its v8::External data. If JS retained texture.release
while dropping the texture itself, the monitor would be freed on GC and
a later release() call would crash.

Track the release function instead of the texture object. Since the
texture holds release as a property, this keeps the monitor alive as
long as either is reachable.

Co-authored-by: Sam Attard <sattard@anthropic.com>
@trop trop bot requested review from a team and MarshallOfSound March 25, 2026 17:51
@trop trop bot added 41-x-y backport This is a backport PR semver/patch backwards-compatible bug fixes labels Mar 25, 2026
@MarshallOfSound MarshallOfSound merged commit 3dcb641 into 41-x-y Mar 26, 2026
113 of 114 checks passed
@MarshallOfSound MarshallOfSound deleted the trop/41-x-y-bp-fix-crash-calling-osr-shared-texture-release-after-texture-gc-d-1774461055154 branch March 26, 2026 07:50
@release-clerk
Copy link
Copy Markdown

release-clerk bot commented Mar 26, 2026

Release Notes Persisted

Fixed a crash when calling an offscreen shared texture's release() after the texture object was garbage collected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

41-x-y backport This is a backport PR semver/patch backwards-compatible bug fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant