Skip to content

Conversation

@jepler
Copy link
Contributor

@jepler jepler commented Aug 3, 2020

It has been suggested at #912 that there may be a case where "you will simply try to unlock unlocked mutex which will generate undefined behavior". By switching from normal to error-check, we will get an error result instead, which will promptly cause rtapi_app to abort.

jepler added 2 commits August 3, 2020 16:29
It has been suggested that the logic in Posix::wait could lead to
an unlock of a not-locked mutex.  If this happens at runtime,
rtapi_app will now abort.

Note that as this lock is only used for sim / non-rt situations, this
cannot affect people running on hardware.

By setting RTAPI_LOCK_FAIL in the environment, you can check that the
checking works, by causing a "lock while already locked" type error.
@jepler jepler mentioned this pull request Aug 4, 2020
@jepler jepler closed this Jan 13, 2021
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