Skip to content

proc: fix sigpanics in swiss map iterator - #4261

Merged
aarzilli merged 1 commit into
masterfrom
fix/swissmap-sigpanic-4005
Feb 14, 2026
Merged

aarzilli merged 1 commit into
masterfrom
fix/swissmap-sigpanic-4005

Conversation

@derekparker

@derekparker derekparker commented Feb 14, 2026 •

Copy link
Copy Markdown
Member

Catch error on swiss map reads and return before starting to panic.

  • loadCurrentTable: check tab after maybeDereference; check all toField() returns for the index, groups, groups.data, and groups.lengthMask fields; extend existing groups nil check to also check Unreadable.
  • loadCurrentGroup: check toField() returns for slots and ctrl fields.

Fixes #4005

The fix adds validation at every point where pointers are dereferenced
or struct fields are accessed:

- loadTypes: check dirPtr after maybeDereference for both small map
  (dirLen <= 0) and large map (dirLen > 0) paths.
- loadCurrentTable: check tab after maybeDereference; check all
  toField() returns for the index, groups, groups.data, and
  groups.lengthMask fields; extend existing groups nil check to also
  check Unreadable.
- loadCurrentGroup: check toField() returns for slots and ctrl fields.

In all cases, the map is marked as Unreadable with a descriptive error
message rather than panicking.

Fixes #4005

@aarzilli aarzilli left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@aarzilli
aarzilli merged commit 380dd7e into master Feb 14, 2026
9 of 13 checks passed
@derekparker
derekparker deleted the fix/swissmap-sigpanic-4005 branch February 14, 2026 15:09
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.

proc: telemetry report: various sigpanics while loading swissmaps

2 participants