-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix potential IndexOutOfBoundsException in curActorIsBlocking and concurrentActorCausesBlocking #277
Conversation
…currentActorCausesBlocking * both functions get the current actor id `actorId = currentActorId[iThread]` but do not handle the case when `actorId = -1`, that is the case before any actor has started executing Signed-off-by: Evgeniy Moiseenko <[email protected]>
Could you please add a test? |
Signed-off-by: Evgeniy Moiseenko <[email protected]>
@ndkoval I've looked into this, and it seems it would be hard to trigger the error and make such test deterministic. One possible way to write test would be to manually create |
@eupp, in this case, I would suggest adding a comment describing why the added logic is required and leaving a link to this PR. |
Maybe it would be better to rewrite the code in a way similar to
thus, covering this weird path separately |
Signed-off-by: Evgeniy Moiseenko <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please fix the build failure on Java 17 (Mac).
both properties access the current actor id
actorId = currentActorId[iThread]
but do not handle the case whenactorId = -1
, that is the case before any actor has started executing