Skip to content

libexpr-c: allow null primop docs - #16407

Open
noib3 wants to merge 1 commit into
NixOS:masterfrom
noib3:fix/c-api-null-primop-doc
Open

libexpr-c: allow null primop docs#16407
noib3 wants to merge 1 commit into
NixOS:masterfrom
noib3:fix/c-api-null-primop-doc

Conversation

@noib3

@noib3 noib3 commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Problem: nix_alloc_primop crashes when the doc pointer is null, despite the C API documenting it as optional.

Solution: treat null as std::nullopt (and add a regression test).


Add 👍 to pull requests you find important.

The Nix maintainer team uses a GitHub project board to schedule and track reviews.

@noib3
noib3 requested a review from edolstra as a code owner August 31, 2026 18:03
@github-actions github-actions Bot added the c api Nix as a C library with a stable interface label Aug 31, 2026
Problem: `nix_alloc_primop` crashes when the doc pointer is null,
despite the C API documenting it as optional.

Solution: treat null as `std::nullopt` (and add a regression test).
@noib3
noib3 force-pushed the fix/c-api-null-primop-doc branch from 7789045 to 53440e1 Compare August 31, 2026 18:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c api Nix as a C library with a stable interface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant