TCollectionProxyInfo Seg fault


Please read tips for efficient and successful posting and posting code

Please fill also the fields below. Note that root -b -q will tell you this info, and starting from 6.28/06 upwards, you can call .forum bug from the ROOT prompt to pre-populate a topic.

ROOT Version: 6.28/04
Platform: macosx (arm64)
Compiler: arm64-apple-darwin20.0.0-clang++


Hi, I am having a bit of trouble with a package throwing a segfault.

I think it is possibly related to

#include <vector>
#include <TCollectionProxyInfo.h>

int main() {
    ROOT::Detail::TCollectionProxyInfo::Generate(ROOT::Detail::TCollectionProxyInfo::Pushback<std::vector<int>>());
}

compiled with

clang++

and

$(root-config --cflags --libs) -fsanitize=address,leak,pointer-subtract,undefined

throwing

 *** Break *** segmentation violation
[/usr/lib/system/libsystem_platform.dylib] _sigtramp (no debug info)
[/Users/user/Documents/testcpp/test] ROOT::Detail::TCollectionProxyInfo* ROOT::Detail::TCollectionProxyInfo::Generate<ROOT::Detail::TCollectionProxyInfo::Pushback<std::__1::vector<int, std::__1::allocator<int>>>>(ROOT::Detail::TCollectionProxyInfo::Pushback<std::__1::vector<int, std::__1::allocator<int>>> const&) (no debug info)
[/Users/user/Documents/testcpp/test] main (no debug info)
[/usr/lib/dyld] start (no debug info)

Any advice?

Hi,

Sorry to read this. Hard to say though given the context shared so far. Do you have a minimal reproducer, standalone (create file, read it, segfault), we can work on?
Do you see the same issue with 6.32?

Cheers,
D

test.cpp (184 Bytes)

You can reproduce the segfault with

clang++ test.cpp $(root-config --cflags  --libs) -fsanitize=address,leak,pointer-subtract,undefined -o a.out; ./a.out

I have not currently tried any other versions of root.

I also tested with

ROOT Version: 6.32.00
Built for macosxarm64 on Jun 21 2024, 22:29:45
From heads/v6-32-patches@tags/v6-32-00

and got the following

a.out(96246,0x1edc2cf40) malloc: nano zone abandoned due to inability to reserve vm space.

 *** Break *** segmentation violation
[/usr/lib/system/libsystem_platform.dylib] _sigtramp (no debug info)
[/Users/user/Documents/testcpp/a.out] ROOT::Detail::TCollectionProxyInfo* ROOT::Detail::TCollectionProxyInfo::Generate<ROOT::Detail::TCollectionProxyInfo::Pushback<std::__1::vector<int, std::__1::allocator<int>>>>(ROOT::Detail::TCollectionProxyInfo::Pushback<std::__1::vector<int, std::__1::allocator<int>>> const&) (no debug info)
[/Users/user/Documents/testcpp/a.out] main (no debug info)
[/usr/lib/dyld] start (no debug info)

Hi,

Thanks. We will have a look to this unit test.
However, can you share the an example that triggers this faulty behaviour during read/write of a collection?

Best,
D

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.