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

FieldCreate::Helper - pure virtual function call #70

Closed
mdavidsaver opened this issue Oct 9, 2019 · 3 comments
Closed

FieldCreate::Helper - pure virtual function call #70

mdavidsaver opened this issue Oct 9, 2019 · 3 comments
Assignees

Comments

@mdavidsaver
Copy link
Member

I've had two reports of a crash in the compare() call below in two different environments (gcc/Linux and msvc/win32).

for(; itp.first!=itp.second; ++itp.first) {
Field* cent(itp.first->second);
FLD* centx(dynamic_cast<FLD*>(cent));
if(centx && compare(*centx, *ent)) {

The WIN32 case specifically gives an error "pure virtual function call" which suggests to me that this isn't simply *NULL.

@mdavidsaver mdavidsaver added the bug label Oct 9, 2019
@mdavidsaver mdavidsaver self-assigned this Oct 9, 2019
@mdavidsaver
Copy link
Member Author

mdavidsaver commented Oct 9, 2019

While I don't understand the crash well, I think my use of dynamic_cast here, on an object which may have started destruction, is suspect. This code is synchronized with ~Field(), and valgrind doesn't report a data race. However, it might be straight undefined behavior.

In any event, use of dynamic_cast is actually an "optimization" here, and can simply be omitted by dd24b2a. We'll see if there are any further occurrences.

@mdavidsaver
Copy link
Member Author

mdavidsaver commented Nov 8, 2019

May be fixed as of 95d4528 in Module 8.0.1 Base 7.0.3.1

@mdavidsaver
Copy link
Member Author

Based on user feedback, probably fixed.

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

No branches or pull requests

1 participant