Skip to content

kernel: check mutability where a tnum implied it - #6705

Merged
fingolfin merged 1 commit into
masterfrom
mh-claude/plist-assign-fastpath-mutability
Oct 8, 2026
Merged

fingolfin merged 1 commit into
masterfrom
mh-claude/plist-assign-fastpath-mutability

Conversation

@fingolfin

@fingolfin fingolfin commented Oct 8, 2026 •

Copy link
Copy Markdown
Member

Two places test for an exact tnum and rely on it implying that the object is mutable: the interpreter and compiled code assign directly to a list with tnum T_PLIST, and MigrateObjects in HPC-GAP sorts the components of a record with tnum T_PREC. Test the mutability as well, so that this keeps working once mutability is no longer part of the tnum (see #6025).

Assisted-by: Claude Code (Opus 5.5)

@fingolfin fingolfin added topic: kernel release notes: not needed PRs introducing changes that are wholly irrelevant to the release notes labels Oct 8, 2026
Comment thread src/hpc/threadapi.c
for (i = 0; i < count; i++) {
Obj obj = objects[i];
if (TNUM_OBJ(obj) == T_PREC) {
if (TNUM_OBJ(obj) == T_PREC && IS_MUTABLE_OBJ(obj)) {

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

@ChrisJefferson sorry I had forgotten to put this in here -- added after your review, but I hope it is fine, as it is in the same spirit as the rest of the changes in here.

Two places test for an exact tnum and rely on it implying that the
object is mutable: the interpreter and compiled code assign directly
to a list with tnum T_PLIST, and MigrateObjects in HPC-GAP sorts the
components of a record with tnum T_PREC. Test the mutability as well,
so that this keeps working once mutability is no longer part of the
tnum (see #6025).

Assisted-by: Claude Code (Opus 5.5)
@fingolfin
fingolfin force-pushed the mh-claude/plist-assign-fastpath-mutability branch from bddafb9 to 559efec Compare October 8, 2026 13:44
@fingolfin fingolfin changed the title kernel: check mutability in plist assignment fast path kernel: check mutability where a tnum implied it Oct 8, 2026
@fingolfin
fingolfin enabled auto-merge (squash) October 8, 2026 14:04
@codecov

codecov Bot commented Oct 8, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 79.57%. Comparing base (512ea92) to head (559efec).

Files with missing lines Patch % Lines
src/hpc/threadapi.c 0.00% 0 Missing and 1 partial ⚠️
src/vars.c 0.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6705      +/-   ##
==========================================
- Coverage   79.57%   79.57%   -0.01%     
==========================================
  Files         683      683              
  Lines      295429   295430       +1     
  Branches     8648     8648              
==========================================
- Hits       235091   235089       -2     
  Misses      58518    58518              
- Partials     1820     1823       +3     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@fingolfin
fingolfin merged commit 9d4d40c into master Oct 8, 2026
33 of 34 checks passed
@fingolfin
fingolfin deleted the mh-claude/plist-assign-fastpath-mutability branch October 8, 2026 15:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release notes: not needed PRs introducing changes that are wholly irrelevant to the release notes topic: kernel

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants