Skip to content

BUG: Prevent free'ing uninitialized pointer in DeviceEvents#2047

Merged
leofang merged 1 commit intoNVIDIA:mainfrom
mdboom:event-set-null-ptr
May 7, 2026
Merged

BUG: Prevent free'ing uninitialized pointer in DeviceEvents#2047
leofang merged 1 commit intoNVIDIA:mainfrom
mdboom:event-set-null-ptr

Conversation

@mdboom
Copy link
Copy Markdown
Contributor

@mdboom mdboom commented May 7, 2026

@Andy-Jost found this on his local machine.

@mdboom mdboom self-assigned this May 7, 2026
@mdboom mdboom added bug Something isn't working P0 High priority - Must do! cuda.core Everything related to the cuda.core module labels May 7, 2026
@mdboom mdboom force-pushed the event-set-null-ptr branch from 2102c1e to 01ac964 Compare May 7, 2026 18:13
Copy link
Copy Markdown
Contributor

@Andy-Jost Andy-Jost left a comment

Choose a reason for hiding this comment

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

Tested and confirmed

@leofang
Copy link
Copy Markdown
Member

leofang commented May 7, 2026

Looks like the same bug as in #1992. I confirm that after this PR we fix them all:
https://github.com/search?q=repo%3ANVIDIA%2Fcuda-python%20__dealloc__%20path%3Acuda_core%2Fcuda%2Fcore%2Fsystem%2F&type=code

@leofang leofang added this to the cuda.core v1.0.0 milestone May 7, 2026
@github-actions

This comment has been minimized.

@leofang leofang enabled auto-merge (squash) May 7, 2026 18:32
@leofang leofang merged commit 2ddbe6b into NVIDIA:main May 7, 2026
180 of 183 checks passed
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 7, 2026

Doc Preview CI
Preview removed because the pull request was closed or merged.

leofang added a commit to leofang/cuda-python that referenced this pull request May 7, 2026
…#2047

- New feature: persistent program cache for Program.compile (InMemoryProgramCache,
  FileStreamProgramCache, make_program_cache_key).
- Fix: graph kernel nodes now prevent kernel-argument GC.
- Fix: DeviceEvents.__dealloc__ crash on uninitialized handle.
leofang added a commit that referenced this pull request May 7, 2026
…anup (#2032)

* Document cuda.core support policy

Add support.rst covering versioning (SemVer), CUDA version support
(dual major versions), Python version support (CPython EOL schedule),
free-threading (experimental), and release cadence (bimonthly).

Closes #2030

* Fix broken CCCL URLs and add missing cuda.bindings interfaces

- Update cuda.coop and cuda.compute URLs from the old
  nvidia.github.io/cccl/python/{coop,compute} paths (now 404)
  to the current unstable doc paths.
- Add nvFatbin and NVML to the cuda.bindings interface list.
- Update all three synced files: README.md, cuda_python/DESCRIPTION.rst,
  and cuda_python/docs/source/index.rst.

* Add missing entries to cuda.core 1.0.0 release notes

Add new features (green contexts, system.Device NVML APIs, system.typing
module, NVML enum re-wrapping), breaking changes (tensor bridge behavior,
system.Device renames, privatized helper classes, UUID format change,
removed enums), and bug fixes (is_managed for pool alloc, nvJitLink log
error handling, NVML event set init, Device.arch unknown, empty field
values, runtime error messages, wheel size reduction).

* Update cuda.core docs for 1.0.0 GA

- api.rst: replace pre-1.0 warning with stable-API statement and link
  to support policy.
- install.rst: update free-threading version reference from 0.4.0 to
  1.0.0.
- nv-versions.json: add 1.0.0 entry for the version switcher dropdown.

* Split cuda.core.system API reference into separate page

Move the CUDA system information / NVML section from api.rst into a
dedicated api_nvml.rst. The new page uses its own `.. module::
cuda.core.system` directive so autosummary entries no longer need the
`system.` prefix. Added to index.rst toctree after api.

* Remove algorithm and size details from make_program_cache_key docstring

The Returns section exposed the hash algorithm and digest size, which
are implementation details. Replace with "opaque bytes digest" so the
public API contract does not pin these.

See #2043

* Remove deprecated cuda.core.experimental namespace

The cuda.core.experimental namespace was deprecated in v0.5.0 when all
public APIs moved to the top-level cuda.core namespace. Remove the
backward-compatibility shim and its test as promised for v1.0.0.

* Add missing release note entries for #1912, #2041, #2047

- New feature: persistent program cache for Program.compile (InMemoryProgramCache,
  FileStreamProgramCache, make_program_cache_key).
- Fix: graph kernel nodes now prevent kernel-argument GC.
- Fix: DeviceEvents.__dealloc__ crash on uninitialized handle.

* Update 1.0.0-notes.rst

* expand support policy

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

Labels

bug Something isn't working cuda.core Everything related to the cuda.core module P0 High priority - Must do!

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants