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

Copy DenseSet in IndexAxis.merge #65

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

ChrisspyB
Copy link
Member

Fixes seg fault #62.
We found a consistent clientside seg fault when using fdb-axes on the databridge. e.g. fdb-axes class=d1,param=167,step=0,expver=0001,dataset=extremes-dt,levtype=sfc,stream=oper,type=fc would seg fault.

The problem:
When you call axis.merge(some_read_only_axis), the axis object gains shared ownership of the read only object's denseset, allowing it to be modified. This corrupts the axis registry which makes assumptions that require its cached axis to be read only.

This fix makes a copy of the axis when first merging, rather than sharing ownership.

@ChrisspyB ChrisspyB requested a review from simondsmart January 7, 2025 16:09
@ChrisspyB ChrisspyB mentioned this pull request Jan 8, 2025
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