-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
TClass::GetListOfDataMembers reload list for struct/class when needed. #6668
Conversation
Starting build on |
Build failed on ROOT-fedora31/noimt. Errors:
|
Build failed on ROOT-fedora30/cxx14. Errors:
And 2 more |
Build failed on ROOT-performance-centos8-multicore/default. Errors:
|
Build failed on ROOT-ubuntu16/nortcxxmod. Errors:
And 2 more |
Build failed on ROOT-debian10-i386/cxx14. Errors:
|
Build failed on windows10/cxx14. |
Build failed on mac1015/cxx17. Warnings:
|
Build failed on mac1014/python3. Errors:
|
The problem was due the introduction (in commit f3f0f13) of a fast path in TClass::GetListOfDataMember which did not take in consideration the case: c = GetClass(someclassname) c->GetState() == TClass::kForwardDeclared c->GetListOfDataMember() -> list is now created but empty. load and parse header file for c->GetState() == TClass::kInterpreted c->GetListOfDataMember() -> list is still empty but should have been filled (loaded at this point). The logic assumed incorrectly that if someclassname was indeed pointing to a class or struct and the list was created then it was loaded. To keep the fast path and correct the logic, we need to 'promote' TListOfDataMembers::fIsLoaded to be an std::atomic
Starting build on |
Build failed on mac1015/cxx17. Errors:
|
Build failed on windows10/cxx14. Failing tests: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me!
The example from the PR description should be added as a test case.
Yep. The test is in root-project/roottest#617 |
@phsft-bot build with flags -DCTEST_TEST_EXCLUDE_NONE=On |
Starting build on |
Build failed on ROOT-fedora31/noimt. Failing tests: |
Build failed on ROOT-performance-centos8-multicore/default. Failing tests: |
Build failed on ROOT-fedora30/cxx14. Failing tests: |
Build failed on mac1015/cxx17. Warnings:
Failing tests:
|
Build failed on mac1014/python3. Failing tests: |
Build failed on ROOT-debian10-i386/cxx14. Failing tests: |
@phsft-bot build with flags -DCTEST_TEST_EXCLUDE_NONE=On |
Starting build on |
Build failed on mac1015/cxx17. Errors:
|
The macos failure is unrelated (complains about an on-going git rebase). |
The problem was due the introduction (in commit f3f0f13) of a fast path in TClass::GetListOfDataMember which did not take in consideration the case:
c = GetClass(someclassname)
c->GetState() == TClass::kForwardDeclared
c->GetListOfDataMember() -> list is now created but empty.
load and parse header file for
c->GetState() == TClass::kInterpreted
c->GetListOfDataMember() -> list is still empty but should have been filled (loaded at this point).
The logic assumed incorrectly that if someclassname was indeed pointing to a class or struct and the list was created then it was loaded.
To keep the fast path and correct the logic, we need to 'promote' TListOfDataMembers::fIsLoaded to be an std::atomic