Skip to content

Skip released ray gens when building the SBT - #31

Merged
iwald-nvidia merged 1 commit into
NVIDIA:mainfrom
MaxFreedomPollard:fix/released-raygen-sbt
Nov 12, 2026
Merged

iwald-nvidia merged 1 commit into
NVIDIA:mainfrom
MaxFreedomPollard:fix/released-raygen-sbt

Conversation

@MaxFreedomPollard

Copy link
Copy Markdown
Contributor

ObjectRegistry::forget() leaves an empty slot in the context's rayGens registry when a ray gen is destroyed, e.g. after owlRayGenRelease(). Context::buildRayGenRecordsOn() asserted that every slot is live, so the next owlBuildSBT() failed that assert in debug builds and dereferenced a null pointer in release builds, unless a newer ray gen had reused the slot in the meantime.

Skip empty slots, as the other registry loops in Context and DeviceContext already do.

ObjectRegistry::forget() leaves an empty slot in the context's rayGens
registry when a ray gen is destroyed, e.g. after owlRayGenRelease().
Context::buildRayGenRecordsOn() asserted that every slot is live, so the
next owlBuildSBT() failed that assert in debug builds and dereferenced a
null pointer in release builds, unless a newer ray gen had reused the
slot in the meantime.

Skip empty slots, as the other registry loops in Context and
DeviceContext already do.

Signed-off-by: Max Freedom Pollard <272618364+MaxFreedomPollard@users.noreply.github.com>
@iwald-nvidia
iwald-nvidia merged commit a701aec into NVIDIA:main Nov 12, 2026
6 checks passed
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.

2 participants