Skip to content
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

lac/constraints_move: Fix undefined behavior #10519

Merged
merged 1 commit into from Jun 12, 2020

Conversation

tamiko
Copy link
Member

@tamiko tamiko commented Jun 12, 2020

It is undefined behavior to access an object that has been moved. It is
also not possible to "move back" an object.

In this particular case with the recent changes to ThreadLocalStorage
and AffineConstraints we run into an exception:

constraints_move.debug: ../nptl/pthread_mutex_lock.c:117: __pthread_mutex_lock: Assertion `mutex->__data.__owner == 0' failed.

(The move operation destroys the mutex and accessing it afterwards
when we try to move back results in a crash.)

It is undefined behavior to access an object that has been moved. It is
also not possible to "move back" an object.

In this particular case with the recent changes to ThreadLocalStorage
and AffineConstraints we run into an exception:

constraints_move.debug: ../nptl/pthread_mutex_lock.c:117: __pthread_mutex_lock: Assertion `mutex->__data.__owner == 0' failed.

(The move operation destroys the mutex and accessing it afterwards
when we try to move back results in a crash.)
@tamiko
Copy link
Member Author

tamiko commented Jun 12, 2020

/rebuild

@kronbichler kronbichler merged commit 25584d0 into dealii:master Jun 12, 2020
@tamiko tamiko deleted the fix_test branch January 4, 2022 12:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants