Skip to content

Fix three small bugs in Actor's method-table handling#7

Closed
joecga4 wants to merge 1 commit into
aschellenberg74:masterfrom
joecga4:fix/actor-method-bugs
Closed

Fix three small bugs in Actor's method-table handling#7
joecga4 wants to merge 1 commit into
aschellenberg74:masterfrom
joecga4:fix/actor-method-bugs

Conversation

@joecga4

@joecga4 joecga4 commented Jul 6, 2026

Copy link
Copy Markdown
  • Actor::processMethod() indexed actorMethods[tag] while iterating with i, so a method whose tag differs from its array position is found by the loop but the wrong entry (or out-of-bounds memory) is dereferenced.
  • ~Actor() used delete on an array allocated with new[], and never freed the ActorMethod objects added by addMethod().
  • The constructor zero-initialized the array with a loop bounded by numMethods, which is always 0 at that point; the bound is now maxNumMethods so the whole array starts null.

Validation: full build + pytest 7/7 + verification suite 18/18 byte-identical + MP/SP/PyMP MPI runs on Ubuntu 24.04.

🤖 Generated with Claude Code

- Actor::processMethod() looked up actorMethods[tag] while iterating
  with i, so a method whose tag differs from its array position is
  found by the loop but the wrong entry (or out-of-bounds memory) is
  dereferenced.
- ~Actor() used delete on an array allocated with new[], and never
  freed the ActorMethod objects added by addMethod().
- The constructor zero-initialized the array with a loop bounded by
  numMethods, which is 0 at that point; the bound is now maxNumMethods
  so the whole array starts null.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@joecga4 joecga4 closed this Jul 15, 2026
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.

1 participant