Skip to content

Comments

proc: fix sigpanics in swiss map iterator#4260

Closed
derekparker wants to merge 1 commit intomasterfrom
fix/swissmap-sigpanic-4005
Closed

proc: fix sigpanics in swiss map iterator#4260
derekparker wants to merge 1 commit intomasterfrom
fix/swissmap-sigpanic-4005

Conversation

@derekparker
Copy link
Member

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

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
@derekparker derekparker deleted the fix/swissmap-sigpanic-4005 branch February 14, 2026 02:43
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

1 participant