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

Segfault when swapping Field3D after mergeYupYdown #1568

Closed
johnomotani opened this issue Feb 12, 2019 · 2 comments
Closed

Segfault when swapping Field3D after mergeYupYdown #1568

johnomotani opened this issue Feb 12, 2019 · 2 comments
Labels

Comments

@johnomotani
Copy link
Contributor

If mergeYupDown() has been called on a Field3D so that its yup_field and ydown_field pointers point to itself, then swapping it may cause a segfault. The problem is that the yup_field and ydown_field pointers are swapped, but continue to point to the original field. The check in the ~Field3D() destructor on whether to delete yup_field or ydown_field will then not skip the delete, and already-deleted memory will be deleted, causing a segfault.

@dschwoerer has a fix for this in 8eae21d of #956.
The issue is also fixed by #1345 which changes the implementation of mergeYupYdown().

@ZedThree
Copy link
Member

#1345 should be going in soon -- I just need to fix the conflicts again

@ZedThree
Copy link
Member

Fixed in #1345

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants