Segmentation violation for a trivial std::unique_ptr

root [0] std::unique_ptr<TH1D> h(new TH1D("h", "h", 1, 0., 1.));
root [1] .q

 *** Break *** segmentation violation

I can indeed reproduce it … not trivial to fix because the garbage collector runs before the interpreter tear down …

This is fixed by Delete the object held by gROOT after we reset the globals. by pcanal · Pull Request #13463 · root-project/root · GitHub

The PR is now merged in all patch branch from 6.18 to master/current.