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

Remove dynamic_cast from headers #124

Merged

Conversation

AmperesAvengement
Copy link
Contributor

Exposing dynamic_cast in headers has been observed to cause segfaults when modules linking to Strumpack are compiled without RTTI support since they have undefined behaviour. This can be fixed by moving the dynamic_cast out of the header

Vhat = DistM_t(grid(), Phi.cols(), Theta.cols());
copy(Vhat.rows(), Vhat.cols(), ch0->ULV_mpi_.Vhat(), 0, 0, Vhat, 0, 0, grid()->ctxt_all());
}
(DistM_t& Theta, DistM_t& Vhat, DistM_t& DUB01, DistM_t& Phi) const;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think these 2 lines can be removed. See the failures in the tests

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, should be fixed in the latest version 👍

@pghysels pghysels merged commit 014c8d2 into pghysels:master Sep 27, 2024
0 of 7 checks passed
@pghysels
Copy link
Owner

There is something wrong in the CI.
But it works on my machine.

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.

2 participants