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

v622: Fix pair offset/size calculation. #6873

Merged
merged 10 commits into from Nov 26, 2020

Conversation

pcanal
Copy link
Member

@pcanal pcanal commented Nov 23, 2020

Fix #6840. i.e Improve handling for std::pair without a dictionary.

@phsft-bot
Copy link
Collaborator

Starting build on ROOT-debian10-i386/cxx14, ROOT-performance-centos8-multicore/default, ROOT-fedora30/cxx14, ROOT-fedora31/noimt, ROOT-ubuntu16/nortcxxmod, mac1015/cxx17, windows10/cxx14
How to customize builds

@pcanal
Copy link
Member Author

pcanal commented Nov 23, 2020

@phsft-bot build with flags -DCTEST_TEST_EXCLUDE_NONE=On

@phsft-bot
Copy link
Collaborator

Starting build on ROOT-debian10-i386/cxx14, ROOT-performance-centos8-multicore/default, ROOT-fedora30/cxx14, ROOT-fedora31/noimt, ROOT-ubuntu16/nortcxxmod, mac1015/cxx17, windows10/cxx14 with flags -DCTEST_TEST_EXCLUDE_NONE=On
How to customize builds

@phsft-bot
Copy link
Collaborator

Build failed on ROOT-performance-centos8-multicore/default.
Running on null:/data/sftnight/workspace/root-pullrequests-build
See console output.

Failing tests:

@phsft-bot
Copy link
Collaborator

Build failed on ROOT-fedora31/noimt.
Running on root-fedora-31-2.cern.ch:/home/sftnight/build/workspace/root-pullrequests-build
See console output.

Failing tests:

@phsft-bot
Copy link
Collaborator

Build failed on mac1015/cxx17.
Running on macphsft18.dyndns.cern.ch:/Users/sftnight/build/jenkins/workspace/root-pullrequests-build
See console output.

Failing tests:

@pcanal
Copy link
Member Author

pcanal commented Nov 24, 2020

@phsft-bot build with flags -DCTEST_TEST_EXCLUDE_NONE=On

@phsft-bot
Copy link
Collaborator

Starting build on ROOT-debian10-i386/cxx14, ROOT-performance-centos8-multicore/default, ROOT-fedora30/cxx14, ROOT-fedora31/noimt, ROOT-ubuntu16/nortcxxmod, mac1015/cxx17, windows10/cxx14 with flags -DCTEST_TEST_EXCLUDE_NONE=On
How to customize builds

@phsft-bot
Copy link
Collaborator

@phsft-bot
Copy link
Collaborator

Build failed on mac1015/cxx17.
Running on macphsft20.dyndns.cern.ch:/Users/sftnight/build/workspace/root-pullrequests-build
See console output.

Failing tests:

@phsft-bot
Copy link
Collaborator

@phsft-bot
Copy link
Collaborator

@pcanal
Copy link
Member Author

pcanal commented Nov 25, 2020

Failures are unrelated (pre-exisiting). @Axel-Naumann This is ready to merge.

core/meta/inc/TClass.h Outdated Show resolved Hide resolved
core/meta/inc/TClass.h Show resolved Hide resolved
io/io/src/TStreamerInfo.cxx Show resolved Hide resolved
The TClass generated by TStreamerInfo::GenerateInfoForPair is neither 'Interpreted' (cling
likely does not, yet, have any information about that pair) nor loaded (the user did not
request a dictionary for it) but need to have special treatment for those TClass.

It is not clear whether this should be a new state.  For now we introduce a new
data member (`fIsSyntheticPair`) and don't increase the size of TClass instance
by using a bit field.
…re provided.

Since getting the right alignment and padding is hard (either use Cling/Clang with the associated memory cost and potential
autoparsing or duplicating the platform dependent code that calculates it), we now only creates the synthetic TClass instance
that represent and std::pair ***if and only*** the call is provided the actual offset of second and sizeof the pair.

This information is known to compiled (and later interpreted) CollectionProxy, to TClass for class containing an std::pair
(via their list of RealData which is recorded in the rootpcm) and to TClass::GetClass templated on the actual type
(since the pair's data members are public)
Extract the offset and size of the pair and pass it along to raw TClass::GetClass
Use the data in fPRealData to calculate the offset and size of the pair
Note: If a StreamerInfo is loaded from a file and is the same information
as an existing one, it is assigned the same "unique id" and we need to double
check before removing it from the global list.
@phsft-bot
Copy link
Collaborator

Starting build on ROOT-debian10-i386/cxx14, ROOT-performance-centos8-multicore/default, ROOT-fedora30/cxx14, ROOT-fedora31/noimt, ROOT-ubuntu16/nortcxxmod, mac1015/cxx17, windows10/cxx14
How to customize builds

@phsft-bot
Copy link
Collaborator

Build failed on ROOT-fedora31/noimt.
Running on root-fedora-31-2.cern.ch:/home/sftnight/build/workspace/root-pullrequests-build
See console output.

Warnings:

  • [2020-11-25T17:10:03.065Z] /home/sftnight/build/workspace/root-pullrequests-build/root/io/io/src/TStreamerInfo.cxx:5683:102: warning: format ‘%d’ expects argument of type ‘int’, but argument 6 has type ‘size_t’ {aka ‘long unsigned int’} [-Wformat=]
  • [2020-11-25T17:10:03.065Z] /home/sftnight/build/workspace/root-pullrequests-build/root/io/io/src/TStreamerInfo.cxx:5683:127: warning: format ‘%d’ expects argument of type ‘int’, but argument 7 has type ‘size_t’ {aka ‘long unsigned int’} [-Wformat=]

@phsft-bot
Copy link
Collaborator

Build failed on ROOT-performance-centos8-multicore/default.
Running on null:/data/sftnight/workspace/root-pullrequests-build
See console output.

Warnings:

  • [2020-11-25T17:12:18.216Z] /data/sftnight/workspace/root-pullrequests-build/root/io/io/src/TStreamerInfo.cxx:5683:13: warning: format ‘%d’ expects argument of type ‘int’, but argument 6 has type ‘size_t’ {aka ‘long unsigned int’} [-Wformat=]
  • [2020-11-25T17:12:18.216Z] /data/sftnight/workspace/root-pullrequests-build/root/io/io/src/TStreamerInfo.cxx:5683:13: warning: format ‘%d’ expects argument of type ‘int’, but argument 7 has type ‘size_t’ {aka ‘long unsigned int’} [-Wformat=]

@phsft-bot
Copy link
Collaborator

Build failed on ROOT-fedora30/cxx14.
Running on root-fedora30-1.cern.ch:/build/workspace/root-pullrequests-build
See console output.

Warnings:

  • [2020-11-25T17:10:32.203Z] /build/workspace/root-pullrequests-build/root/io/io/src/TStreamerInfo.cxx:5683:102: warning: format ‘%d’ expects argument of type ‘int’, but argument 6 has type ‘size_t’ {aka ‘long unsigned int’} [-Wformat=]
  • [2020-11-25T17:10:32.203Z] /build/workspace/root-pullrequests-build/root/io/io/src/TStreamerInfo.cxx:5683:127: warning: format ‘%d’ expects argument of type ‘int’, but argument 7 has type ‘size_t’ {aka ‘long unsigned int’} [-Wformat=]

@phsft-bot
Copy link
Collaborator

Build failed on ROOT-ubuntu16/nortcxxmod.
Running on sft-ubuntu-1604-3.cern.ch:/build/workspace/root-pullrequests-build
See console output.

Warnings:

  • [2020-11-25T17:11:22.942Z] /mnt/build/workspace/root-pullrequests-build/root/io/io/src/TStreamerInfo.cxx:5684:86: warning: format ‘%d’ expects argument of type ‘int’, but argument 6 has type ‘size_t {aka long unsigned int}’ [-Wformat=]
  • [2020-11-25T17:11:22.942Z] /mnt/build/workspace/root-pullrequests-build/root/io/io/src/TStreamerInfo.cxx:5684:86: warning: format ‘%d’ expects argument of type ‘int’, but argument 7 has type ‘size_t {aka long unsigned int}’ [-Wformat=]

@phsft-bot
Copy link
Collaborator

Build failed on mac1015/cxx17.
Running on macitois17.cern.ch:/Users/sftnight/build/workspace/root-pullrequests-build
See console output.

Warnings:

  • [2020-11-25T18:31:45.623Z] /Users/sftnight/build/workspace/root-pullrequests-build/root/io/io/src/TStreamerInfo.cxx:5684:52: warning: format specifies type 'int' but the argument has type 'size_t' (aka 'unsigned long') [-Wformat]
  • [2020-11-25T18:31:45.623Z] /Users/sftnight/build/workspace/root-pullrequests-build/root/io/io/src/TStreamerInfo.cxx:5684:70: warning: format specifies type 'int' but the argument has type 'size_t' (aka 'unsigned long') [-Wformat]

@phsft-bot
Copy link
Collaborator

Starting build on ROOT-debian10-i386/cxx14, ROOT-performance-centos8-multicore/default, ROOT-fedora30/cxx14, ROOT-fedora31/noimt, ROOT-ubuntu16/nortcxxmod, mac1015/cxx17, windows10/cxx14
How to customize builds

@phsft-bot
Copy link
Collaborator

Build failed on ROOT-fedora31/noimt.
Running on root-fedora-31-2.cern.ch:/home/sftnight/build/workspace/root-pullrequests-build
See console output.

Warnings:

  • [2020-11-25T20:33:57.661Z] /home/sftnight/build/workspace/root-pullrequests-build/root/io/io/src/TStreamerInfo.cxx:5683:102: warning: format ‘%d’ expects argument of type ‘int’, but argument 6 has type ‘size_t’ {aka ‘long unsigned int’} [-Wformat=]
  • [2020-11-25T20:33:57.661Z] /home/sftnight/build/workspace/root-pullrequests-build/root/io/io/src/TStreamerInfo.cxx:5683:127: warning: format ‘%d’ expects argument of type ‘int’, but argument 7 has type ‘size_t’ {aka ‘long unsigned int’} [-Wformat=]

@phsft-bot
Copy link
Collaborator

Build failed on ROOT-performance-centos8-multicore/default.
Running on null:/data/sftnight/workspace/root-pullrequests-build
See console output.

Warnings:

  • [2020-11-25T20:35:37.633Z] /data/sftnight/workspace/root-pullrequests-build/root/io/io/src/TStreamerInfo.cxx:5683:13: warning: format ‘%d’ expects argument of type ‘int’, but argument 6 has type ‘size_t’ {aka ‘long unsigned int’} [-Wformat=]
  • [2020-11-25T20:35:37.633Z] /data/sftnight/workspace/root-pullrequests-build/root/io/io/src/TStreamerInfo.cxx:5683:13: warning: format ‘%d’ expects argument of type ‘int’, but argument 7 has type ‘size_t’ {aka ‘long unsigned int’} [-Wformat=]

@phsft-bot
Copy link
Collaborator

Build failed on ROOT-fedora30/cxx14.
Running on root-fedora30-1.cern.ch:/build/workspace/root-pullrequests-build
See console output.

Warnings:

  • [2020-11-25T20:33:51.293Z] /build/workspace/root-pullrequests-build/root/io/io/src/TStreamerInfo.cxx:5683:102: warning: format ‘%d’ expects argument of type ‘int’, but argument 6 has type ‘size_t’ {aka ‘long unsigned int’} [-Wformat=]
  • [2020-11-25T20:33:51.293Z] /build/workspace/root-pullrequests-build/root/io/io/src/TStreamerInfo.cxx:5683:127: warning: format ‘%d’ expects argument of type ‘int’, but argument 7 has type ‘size_t’ {aka ‘long unsigned int’} [-Wformat=]

@phsft-bot
Copy link
Collaborator

Starting build on ROOT-debian10-i386/cxx14, ROOT-performance-centos8-multicore/default, ROOT-fedora30/cxx14, ROOT-fedora31/noimt, ROOT-ubuntu16/nortcxxmod, mac1015/cxx17, windows10/cxx14
How to customize builds

@pcanal pcanal merged commit 42ac10d into root-project:v6-22-00-patches Nov 26, 2020
@pcanal pcanal deleted the v622-pairOffset branch November 26, 2020 00:17
@@ -5678,6 +5678,12 @@ TVirtualStreamerInfo *TStreamerInfo::GenerateInfoForPair(const std::string &firs
// This TStreamerInfo is then used as if it was read from a file to generate
// and emulated TClass.

if (hint_pair_offset && hint_pair_offset == hint_pair_size) {
Copy link
Member

Choose a reason for hiding this comment

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

I really meant to please add an assert on (!hint_pair_offset == !hint_pair_size): it's checking that either both or non are ==0. Your current if doesn't check that.

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.

None yet

3 participants