-
Notifications
You must be signed in to change notification settings - Fork 1.3k
PCM filename contains libName + dictName #17
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
Closed
Closed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pcanal
referenced
this pull request
in pcanal/root
Feb 1, 2018
In the example below, thread #11 is waiting on the ‘AppKit lock’ while thread #1 is waiting on the ROOT read lock and thread #12 is waiting on the ROOT write lock. In thread #11, the ROOT write lock is taken/held by frame #9, TCanvas::Update, to ‘serialize’ the update to the windowing system. In thread #1, the ‘AppKit lock’ is likely taken/held by a frame in the #16 to root-project#40 range. This commit remove the dead lock by removing the unnecessary use of code needing the ROOT lock within code run under the AppKit lock so that in they case thread #1 no longer need to wait for the ROOT (read) lock. In addition it should be investigated whether the ROOT (write) lock should be taken in thread #1, frame 1 (TMacOSXSystem::ProcessPendingEvents) for the same reason it is taken in TCanvas::Update. thread #11 frame #0: 0x00007fffab109bf2 libsystem_kernel.dylib`__psynch_cvwait + 10 frame #1: 0x00007fffab1f57fa libsystem_pthread.dylib`_pthread_cond_wait + 712 frame #2: 0x00007fff93394e34 AppKit`-[NSViewHierarchyLock lockForReadingWithExceptionHandler:] + 287 frame #3: 0x00007fff934948ae AppKit`-[NSWindow _copyAcquiredViewHierarchyLock] + 126 frame #4: 0x00007fff9349442c AppKit`-[NSView lockFocusIfCanDraw] + 159 frame #5: 0x000000011c09063d libGCocoa.so`ROOT::MacOSX::X11::CommandBuffer::Flush(this=0x0000000100dbb080, impl=0x0000000100dbb000) at X11Buffer.mm:550 frame #6: 0x000000011c04e9c4 libGCocoa.so`TGCocoa::Update(this=0x0000000100ad1bc0, mode=1) at TGCocoa.mm:536 frame #7: 0x000000011c04ff3e libGCocoa.so`TGCocoa::UpdateWindow(this=0x0000000100ad1bc0, (null)=1) at TGCocoa.mm:776 frame #8: 0x000000011ad70827 libGpad.so`TCanvas::Flush(this=0x000000012274e740) at TCanvas.cxx:1096 frame #9: 0x000000011ad7830f libGpad.so`TCanvas::Update(this=0x000000012274e740) at TCanvas.cxx:2287 frame #10: 0x0000000100fe4e86 threadsh2_C.so`handle2((null)=0x0000000000000001) at threadsh2.C:105 frame #11: 0x0000000100f55680 libThread.so`TThread::Function(ptr=0x0000000122753b00) at TThread.cxx:821 frame #12: 0x00007fffab1f493b libsystem_pthread.dylib`_pthread_body + 180 frame #13: 0x00007fffab1f4887 libsystem_pthread.dylib`_pthread_start + 286 frame #14: 0x00007fffab1f408d libsystem_pthread.dylib`thread_start + 13 thread #1, queue = 'com.apple.main-thread', stop reason = signal SIGSTOP frame #0: 0x00007fffab109bf2 libsystem_kernel.dylib`__psynch_cvwait + 10 frame #1: 0x00007fffab1f57fa libsystem_pthread.dylib`_pthread_cond_wait + 712 frame #2: 0x00007fffa9b734cd libc++.1.dylib`std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 47 frame #3: 0x0000000100f76b6f libThread.so`void std::__1::condition_variable_any::wait<std::__1::unique_lock<std::__1::mutex> >(this=0x0000000122753a28, __lock=0x00007fff5fbf5cf8) at condition_variable:202 frame #4: 0x0000000100f6887e libThread.so`ROOT::TReentrantRWLock<std::__1::mutex, ROOT::Internal::RecurseCounts>::ReadLock() [inlined] void std::__1::condition_variable_any::wait<std::__1::unique_lock<std::__1::mutex>, ROOT::TReentrantRWLock<std::__1::mutex, ROOT::Internal::RecurseCounts>::ReadLock()::'lambda'()>(this=0x0000000122753a28, __lock=0x00007fff5fbf5cf8, __pred=(anonymous class) @ 0x00007fff5fbf5e08)::'lambda'()) at condition_variable:211 frame #5: 0x0000000100f68857 libThread.so`ROOT::TReentrantRWLock<std::__1::mutex, ROOT::Internal::RecurseCounts>::ReadLock(this=0x00000001227539d8) at TReentrantRWLock.cxx:95 frame #6: 0x0000000100f5c719 libThread.so`ROOT::TRWMutexImp<std::__1::mutex, ROOT::Internal::RecurseCounts>::ReadLock(this=0x00000001227539d0) at TRWMutexImp.cxx:33 frame #7: 0x00000001000f52d1 libCore.so`ROOT::TReadLockGuard::TReadLockGuard(this=0x00007fff5fbf5f48, mutex=0x00000001227539d0) at TVirtualRWMutex.h:89 frame #8: 0x00000001000f275d libCore.so`ROOT::TReadLockGuard::TReadLockGuard(this=0x00007fff5fbf5f48, mutex=0x00000001227539d0) at TVirtualRWMutex.h:88 frame #9: 0x00000001002fcebf libCore.so`THashTable::FindObject(this=0x0000000100b0e120, name="TGTextView") const at THashTable.cxx:242 frame #10: 0x00000001003a67fd libCore.so`TClass::GetClass(name="TGTextView", load=true, silent=true) at TClass.cxx:2900 frame #11: 0x00000001003c9e16 libCore.so`TClass::InheritsFrom(this=0x0000000118fe1250, classname="TGTextView") const at TClass.cxx:4683 frame #12: 0x000000010024cb6e libCore.so`TObject::InheritsFrom(this=0x0000000126908de0, classname="TGTextView") const at TObject.cxx:445 frame #13: 0x000000011c03e47f libGCocoa.so`ROOT::MacOSX::X11::ViewIsTextView(viewID=116) at QuartzWindow.mm:899 frame #14: 0x000000011c03e518 libGCocoa.so`ROOT::MacOSX::X11::ViewIsTextView(view=0x0000000126908ee0) at QuartzWindow.mm:907 frame #15: 0x000000011c04706c libGCocoa.so`::-[QuartzView drawRect:](self=0x0000000126908ee0, _cmd="drawRect:", dirtyRect=(origin = (x = 0, y = 0), size = (width = 29, height = 21))) at QuartzWindow.mm:2728 frame #16: 0x00007fff934a4f99 AppKit`-[NSView _drawRect:clip:] + 2276 frame #17: 0x00007fff934f4f2f AppKit`-[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] + 1753 frame #18: 0x00007fff934f539a AppKit`-[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] + 2884 frame #19: 0x00007fff934f539a AppKit`-[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] + 2884 frame #20: 0x00007fff934f539a AppKit`-[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] + 2884 frame #21: 0x00007fff934a2ad2 AppKit`-[NSView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:] + 837 frame #22: 0x00007fff934a22af AppKit`-[NSThemeFrame _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:] + 334 frame root-project#23: 0x00007fff934a06d8 AppKit`-[NSView _displayRectIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:] + 2452 frame root-project#24: 0x00007fff9349bfca AppKit`-[NSView displayIfNeeded] + 1748 frame root-project#25: 0x00007fff9349b8db AppKit`-[NSWindow displayIfNeeded] + 230 frame root-project#26: 0x00007fff93bfbcb4 AppKit`___NSWindowGetDisplayCycleObserver_block_invoke.6228 + 277 frame root-project#27: 0x00007fff9349b3b9 AppKit`__37+[NSDisplayCycle currentDisplayCycle]_block_invoke + 454 frame root-project#28: 0x00007fff9b384cc6 QuartzCore`CA::Transaction::run_commit_handlers(CATransactionPhase) + 46 frame root-project#29: 0x00007fff9b48e8ac QuartzCore`CA::Context::commit_transaction(CA::Transaction*) + 160 frame root-project#30: 0x00007fff9b3837a1 QuartzCore`CA::Transaction::commit() + 475 frame root-project#31: 0x00007fff9377e8b1 AppKit`__37+[NSDisplayCycle currentDisplayCycle]_block_invoke.31 + 323 frame root-project#32: 0x00007fff95874d37 CoreFoundation`__CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 23 frame root-project#33: 0x00007fff95874ca7 CoreFoundation`__CFRunLoopDoObservers + 391 frame root-project#34: 0x00007fff958556d9 CoreFoundation`__CFRunLoopRun + 873 frame root-project#35: 0x00007fff95855114 CoreFoundation`CFRunLoopRunSpecific + 420 frame root-project#36: 0x00007fff94db5ebc HIToolbox`RunCurrentEventLoopInMode + 240 frame root-project#37: 0x00007fff94db5bf9 HIToolbox`ReceiveNextEventCommon + 184 frame root-project#38: 0x00007fff94db5b26 HIToolbox`_BlockUntilNextEventMatchingListInModeWithFilter + 71 frame root-project#39: 0x00007fff9334ca54 AppKit`_DPSNextEvent + 1120 frame root-project#40: 0x00007fff93ac87ee AppKit`-[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 2796 frame root-project#41: 0x0000000100491031 libCore.so`TMacOSXSystem::ProcessPendingEvents(this=0x0000000100c06d60) at TMacOSXSystem.mm:473 frame root-project#42: 0x000000010049097d libCore.so`TMacOSXSystem::DispatchOneEvent(this=0x0000000100c06d60, pendingOnly=true) at TMacOSXSystem.mm:365 frame root-project#43: 0x0000000100294f4b libCore.so`TSystem::ProcessEvents(this=0x0000000100c06d60) at TSystem.cxx:429 frame root-project#44: 0x0000000100fe5844 threadsh2_C.so`threadsh2() at threadsh2.C:196 frame root-project#45: 0x0000000100fec06a frame root-project#46: 0x0000000103d7dc2f libCling.so`cling::IncrementalExecutor::executeWrapper(this=0x0000000100a1d410, function=(Data = "_Z15__cling_Un1Qu30Pv", Length = 21), returnValue=0x00007fff5fbfbde0) at IncrementalExecutor.h:196 frame root-project#47: 0x0000000103d7db1f libCling.so`cling::Interpreter::RunFunction(this=0x0000000100a0e3b0, FD=0x000000011780f6b0, res=0x00007fff5fbfbde0) at Interpreter.cpp:980 frame root-project#48: 0x0000000103d7a92a libCling.so`cling::Interpreter::EvaluateInternal(this=0x0000000100a0e3b0, input="threadsh2()", CO=CompilationOptions @ 0x00007fff5fbfaae8, V=0x00007fff5fbfbde0, T=0x0000000000000000, wrapPoint=44) at Interpreter.cpp:1232 frame root-project#49: 0x0000000103d79e27 libCling.so`cling::Interpreter::process(this=0x0000000100a0e3b0, input="threadsh2()", V=0x00007fff5fbfbde0, T=0x0000000000000000, disableValuePrinting=false) at Interpreter.cpp:684 frame root-project#50: 0x0000000103e552a5 libCling.so`cling::MetaProcessor::process(this=0x0000000100b65aa0, input_line=(Data = "threadsh2()", Length = 11), compRes=0x00007fff5fbfb540, result=0x00007fff5fbfbde0, disableValuePrinting=false) at MetaProcessor.cpp:341 frame root-project#51: 0x000000010397bd63 libCling.so`HandleInterpreterException(metaProcessor=0x0000000100b65aa0, input_line="threadsh2()", compRes=0x00007fff5fbfb540, result=0x00007fff5fbfbde0) at TCling.cxx:2053 frame root-project#52: 0x000000010397a16e libCling.so`TCling::ProcessLine(this=0x0000000100a0de40, line=".X /opt/build/root_builds/master.debug/tutorials/thread/./threadsh2.C+", error=0x00007fff5fbfd694) at TCling.cxx:2170 frame root-project#53: 0x0000000103984436 libCling.so`TCling::ProcessLineSynch(this=0x0000000100a0de40, line=".X /opt/build/root_builds/master.debug/tutorials/thread/./threadsh2.C+", error=0x00007fff5fbfd694) at TCling.cxx:3044 frame root-project#54: 0x00000001001f3133 libCore.so`TApplication::ExecuteFile(file="threadsh2.C+", error=0x00007fff5fbfd694, keep=false) at TApplication.cxx:1143 frame root-project#55: 0x00000001001f19e0 libCore.so`TApplication::ProcessFile(this=0x0000000100b113e0, file="threadsh2.C+", error=0x00007fff5fbfd694, keep=false) at TApplication.cxx:1015 frame root-project#56: 0x00000001001f138f libCore.so`TApplication::ProcessLine(this=0x0000000100b113e0, line=".x threadsh2.C+", sync=false, err=0x00007fff5fbfd694) at TApplication.cxx:988 frame root-project#57: 0x000000010009878d libRint.so`TRint::ProcessLineNr(this=0x0000000100b113e0, filestem="ROOT_cli_", line=".x threadsh2.C+", error=0x00007fff5fbfd694) at TRint.cxx:756 frame root-project#58: 0x0000000100097daf libRint.so`TRint::Run(this=0x0000000100b113e0, retrn=false) at TRint.cxx:416 frame root-project#59: 0x00000001000027a4 root.exe`main(argc=1, argv=0x00007fff5fbff780) at rmain.cxx:30 frame root-project#60: 0x00007fffaafdb235 libdyld.dylib`start + 1 thread #12 frame #0: 0x00007fffab109bf2 libsystem_kernel.dylib`__psynch_cvwait + 10 frame #1: 0x00007fffab1f57fa libsystem_pthread.dylib`_pthread_cond_wait + 712 frame #2: 0x00007fffa9b734cd libc++.1.dylib`std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 47 frame #3: 0x0000000100f76b6f libThread.so`void std::__1::condition_variable_any::wait<std::__1::unique_lock<std::__1::mutex> >(this=0x0000000122753a28, __lock=0x0000700009f18898) at condition_variable:202 frame #4: 0x0000000100f697b4 libThread.so`ROOT::TReentrantRWLock<std::__1::mutex, ROOT::Internal::RecurseCounts>::WriteLock() [inlined] void std::__1::condition_variable_any::wait<std::__1::unique_lock<std::__1::mutex>, ROOT::TReentrantRWLock<std::__1::mutex, ROOT::Internal::RecurseCounts>::WriteLock()::'lambda'()>(this=0x0000000122753a28, __lock=0x0000700009f18898, __pred=(anonymous class) @ 0x0000700009f18a28)::'lambda'()) at condition_variable:211 frame #5: 0x0000000100f69790 libThread.so`ROOT::TReentrantRWLock<std::__1::mutex, ROOT::Internal::RecurseCounts>::WriteLock(this=0x00000001227539d8) at TReentrantRWLock.cxx:175 frame #6: 0x0000000100f5c779 libThread.so`ROOT::TRWMutexImp<std::__1::mutex, ROOT::Internal::RecurseCounts>::WriteLock(this=0x00000001227539d0) at TRWMutexImp.cxx:42 frame #7: 0x0000000100f57df6 libThread.so`ROOT::TVirtualRWMutex::Lock(this=0x00000001227539d0) at TVirtualRWMutex.h:52 frame #8: 0x00000001039b2dd9 libCling.so`TLockGuard::TLockGuard(this=0x0000700009f18b48, mutex=0x00000001227539d0) at TVirtualMutex.h:85 frame #9: 0x000000010397ba8d libCling.so`TLockGuard::TLockGuard(this=0x0000700009f18b48, mutex=0x00000001227539d0) at TVirtualMutex.h:85 frame #10: 0x00000001039aa152 libCling.so`TCling::ClassInfo_Factory(this=0x0000000100a0de40, all=true) const at TCling.cxx:7216 frame #11: 0x00000001004150ba libCore.so`TMethodCall::Init(this=0x0000700009f18d80, cl=0x0000000100af0470, method="Print", params="", objectIsConst=false) at TMethodCall.cxx:259 frame #12: 0x0000000100414ff3 libCore.so`TMethodCall::TMethodCall(this=0x0000700009f18d80, cl=0x0000000100af0470, method="Print", params="") at TMethodCall.cxx:62 frame #13: 0x000000010041519d libCore.so`TMethodCall::TMethodCall(this=0x0000700009f18d80, cl=0x0000000100af0470, method="Print", params="") at TMethodCall.cxx:61 frame #14: 0x0000000100fe471a threadsh2_C.so`handle1((null)=0x0000000000000000) at threadsh2.C:48 frame #15: 0x0000000100f55680 libThread.so`TThread::Function(ptr=0x0000000122754790) at TThread.cxx:821 frame #16: 0x00007fffab1f493b libsystem_pthread.dylib`_pthread_body + 180 frame #17: 0x00007fffab1f4887 libsystem_pthread.dylib`_pthread_start + 286 frame #18: 0x00007fffab1f408d libsystem_pthread.dylib`thread_start + 13
pcanal
added a commit
that referenced
this pull request
Feb 2, 2018
In the example below, thread #11 is waiting on the ‘AppKit lock’ while thread #1 is waiting on the ROOT read lock and thread #12 is waiting on the ROOT write lock. In thread #11, the ROOT write lock is taken/held by frame #9, TCanvas::Update, to ‘serialize’ the update to the windowing system. In thread #1, the ‘AppKit lock’ is likely taken/held by a frame in the #16 to #40 range. This commit remove the dead lock by removing the unnecessary use of code needing the ROOT lock within code run under the AppKit lock so that in they case thread #1 no longer need to wait for the ROOT (read) lock. In addition it should be investigated whether the ROOT (write) lock should be taken in thread #1, frame 1 (TMacOSXSystem::ProcessPendingEvents) for the same reason it is taken in TCanvas::Update. thread #11 frame #0: 0x00007fffab109bf2 libsystem_kernel.dylib`__psynch_cvwait + 10 frame #1: 0x00007fffab1f57fa libsystem_pthread.dylib`_pthread_cond_wait + 712 frame #2: 0x00007fff93394e34 AppKit`-[NSViewHierarchyLock lockForReadingWithExceptionHandler:] + 287 frame #3: 0x00007fff934948ae AppKit`-[NSWindow _copyAcquiredViewHierarchyLock] + 126 frame #4: 0x00007fff9349442c AppKit`-[NSView lockFocusIfCanDraw] + 159 frame #5: 0x000000011c09063d libGCocoa.so`ROOT::MacOSX::X11::CommandBuffer::Flush(this=0x0000000100dbb080, impl=0x0000000100dbb000) at X11Buffer.mm:550 frame #6: 0x000000011c04e9c4 libGCocoa.so`TGCocoa::Update(this=0x0000000100ad1bc0, mode=1) at TGCocoa.mm:536 frame #7: 0x000000011c04ff3e libGCocoa.so`TGCocoa::UpdateWindow(this=0x0000000100ad1bc0, (null)=1) at TGCocoa.mm:776 frame #8: 0x000000011ad70827 libGpad.so`TCanvas::Flush(this=0x000000012274e740) at TCanvas.cxx:1096 frame #9: 0x000000011ad7830f libGpad.so`TCanvas::Update(this=0x000000012274e740) at TCanvas.cxx:2287 frame #10: 0x0000000100fe4e86 threadsh2_C.so`handle2((null)=0x0000000000000001) at threadsh2.C:105 frame #11: 0x0000000100f55680 libThread.so`TThread::Function(ptr=0x0000000122753b00) at TThread.cxx:821 frame #12: 0x00007fffab1f493b libsystem_pthread.dylib`_pthread_body + 180 frame #13: 0x00007fffab1f4887 libsystem_pthread.dylib`_pthread_start + 286 frame #14: 0x00007fffab1f408d libsystem_pthread.dylib`thread_start + 13 thread #1, queue = 'com.apple.main-thread', stop reason = signal SIGSTOP frame #0: 0x00007fffab109bf2 libsystem_kernel.dylib`__psynch_cvwait + 10 frame #1: 0x00007fffab1f57fa libsystem_pthread.dylib`_pthread_cond_wait + 712 frame #2: 0x00007fffa9b734cd libc++.1.dylib`std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 47 frame #3: 0x0000000100f76b6f libThread.so`void std::__1::condition_variable_any::wait<std::__1::unique_lock<std::__1::mutex> >(this=0x0000000122753a28, __lock=0x00007fff5fbf5cf8) at condition_variable:202 frame #4: 0x0000000100f6887e libThread.so`ROOT::TReentrantRWLock<std::__1::mutex, ROOT::Internal::RecurseCounts>::ReadLock() [inlined] void std::__1::condition_variable_any::wait<std::__1::unique_lock<std::__1::mutex>, ROOT::TReentrantRWLock<std::__1::mutex, ROOT::Internal::RecurseCounts>::ReadLock()::'lambda'()>(this=0x0000000122753a28, __lock=0x00007fff5fbf5cf8, __pred=(anonymous class) @ 0x00007fff5fbf5e08)::'lambda'()) at condition_variable:211 frame #5: 0x0000000100f68857 libThread.so`ROOT::TReentrantRWLock<std::__1::mutex, ROOT::Internal::RecurseCounts>::ReadLock(this=0x00000001227539d8) at TReentrantRWLock.cxx:95 frame #6: 0x0000000100f5c719 libThread.so`ROOT::TRWMutexImp<std::__1::mutex, ROOT::Internal::RecurseCounts>::ReadLock(this=0x00000001227539d0) at TRWMutexImp.cxx:33 frame #7: 0x00000001000f52d1 libCore.so`ROOT::TReadLockGuard::TReadLockGuard(this=0x00007fff5fbf5f48, mutex=0x00000001227539d0) at TVirtualRWMutex.h:89 frame #8: 0x00000001000f275d libCore.so`ROOT::TReadLockGuard::TReadLockGuard(this=0x00007fff5fbf5f48, mutex=0x00000001227539d0) at TVirtualRWMutex.h:88 frame #9: 0x00000001002fcebf libCore.so`THashTable::FindObject(this=0x0000000100b0e120, name="TGTextView") const at THashTable.cxx:242 frame #10: 0x00000001003a67fd libCore.so`TClass::GetClass(name="TGTextView", load=true, silent=true) at TClass.cxx:2900 frame #11: 0x00000001003c9e16 libCore.so`TClass::InheritsFrom(this=0x0000000118fe1250, classname="TGTextView") const at TClass.cxx:4683 frame #12: 0x000000010024cb6e libCore.so`TObject::InheritsFrom(this=0x0000000126908de0, classname="TGTextView") const at TObject.cxx:445 frame #13: 0x000000011c03e47f libGCocoa.so`ROOT::MacOSX::X11::ViewIsTextView(viewID=116) at QuartzWindow.mm:899 frame #14: 0x000000011c03e518 libGCocoa.so`ROOT::MacOSX::X11::ViewIsTextView(view=0x0000000126908ee0) at QuartzWindow.mm:907 frame #15: 0x000000011c04706c libGCocoa.so`::-[QuartzView drawRect:](self=0x0000000126908ee0, _cmd="drawRect:", dirtyRect=(origin = (x = 0, y = 0), size = (width = 29, height = 21))) at QuartzWindow.mm:2728 frame #16: 0x00007fff934a4f99 AppKit`-[NSView _drawRect:clip:] + 2276 frame #17: 0x00007fff934f4f2f AppKit`-[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] + 1753 frame #18: 0x00007fff934f539a AppKit`-[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] + 2884 frame #19: 0x00007fff934f539a AppKit`-[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] + 2884 frame #20: 0x00007fff934f539a AppKit`-[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] + 2884 frame #21: 0x00007fff934a2ad2 AppKit`-[NSView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:] + 837 frame #22: 0x00007fff934a22af AppKit`-[NSThemeFrame _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:] + 334 frame #23: 0x00007fff934a06d8 AppKit`-[NSView _displayRectIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:] + 2452 frame #24: 0x00007fff9349bfca AppKit`-[NSView displayIfNeeded] + 1748 frame #25: 0x00007fff9349b8db AppKit`-[NSWindow displayIfNeeded] + 230 frame #26: 0x00007fff93bfbcb4 AppKit`___NSWindowGetDisplayCycleObserver_block_invoke.6228 + 277 frame #27: 0x00007fff9349b3b9 AppKit`__37+[NSDisplayCycle currentDisplayCycle]_block_invoke + 454 frame #28: 0x00007fff9b384cc6 QuartzCore`CA::Transaction::run_commit_handlers(CATransactionPhase) + 46 frame #29: 0x00007fff9b48e8ac QuartzCore`CA::Context::commit_transaction(CA::Transaction*) + 160 frame #30: 0x00007fff9b3837a1 QuartzCore`CA::Transaction::commit() + 475 frame #31: 0x00007fff9377e8b1 AppKit`__37+[NSDisplayCycle currentDisplayCycle]_block_invoke.31 + 323 frame #32: 0x00007fff95874d37 CoreFoundation`__CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 23 frame #33: 0x00007fff95874ca7 CoreFoundation`__CFRunLoopDoObservers + 391 frame #34: 0x00007fff958556d9 CoreFoundation`__CFRunLoopRun + 873 frame #35: 0x00007fff95855114 CoreFoundation`CFRunLoopRunSpecific + 420 frame #36: 0x00007fff94db5ebc HIToolbox`RunCurrentEventLoopInMode + 240 frame #37: 0x00007fff94db5bf9 HIToolbox`ReceiveNextEventCommon + 184 frame #38: 0x00007fff94db5b26 HIToolbox`_BlockUntilNextEventMatchingListInModeWithFilter + 71 frame #39: 0x00007fff9334ca54 AppKit`_DPSNextEvent + 1120 frame #40: 0x00007fff93ac87ee AppKit`-[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 2796 frame #41: 0x0000000100491031 libCore.so`TMacOSXSystem::ProcessPendingEvents(this=0x0000000100c06d60) at TMacOSXSystem.mm:473 frame #42: 0x000000010049097d libCore.so`TMacOSXSystem::DispatchOneEvent(this=0x0000000100c06d60, pendingOnly=true) at TMacOSXSystem.mm:365 frame #43: 0x0000000100294f4b libCore.so`TSystem::ProcessEvents(this=0x0000000100c06d60) at TSystem.cxx:429 frame #44: 0x0000000100fe5844 threadsh2_C.so`threadsh2() at threadsh2.C:196 frame #45: 0x0000000100fec06a frame #46: 0x0000000103d7dc2f libCling.so`cling::IncrementalExecutor::executeWrapper(this=0x0000000100a1d410, function=(Data = "_Z15__cling_Un1Qu30Pv", Length = 21), returnValue=0x00007fff5fbfbde0) at IncrementalExecutor.h:196 frame #47: 0x0000000103d7db1f libCling.so`cling::Interpreter::RunFunction(this=0x0000000100a0e3b0, FD=0x000000011780f6b0, res=0x00007fff5fbfbde0) at Interpreter.cpp:980 frame #48: 0x0000000103d7a92a libCling.so`cling::Interpreter::EvaluateInternal(this=0x0000000100a0e3b0, input="threadsh2()", CO=CompilationOptions @ 0x00007fff5fbfaae8, V=0x00007fff5fbfbde0, T=0x0000000000000000, wrapPoint=44) at Interpreter.cpp:1232 frame #49: 0x0000000103d79e27 libCling.so`cling::Interpreter::process(this=0x0000000100a0e3b0, input="threadsh2()", V=0x00007fff5fbfbde0, T=0x0000000000000000, disableValuePrinting=false) at Interpreter.cpp:684 frame #50: 0x0000000103e552a5 libCling.so`cling::MetaProcessor::process(this=0x0000000100b65aa0, input_line=(Data = "threadsh2()", Length = 11), compRes=0x00007fff5fbfb540, result=0x00007fff5fbfbde0, disableValuePrinting=false) at MetaProcessor.cpp:341 frame #51: 0x000000010397bd63 libCling.so`HandleInterpreterException(metaProcessor=0x0000000100b65aa0, input_line="threadsh2()", compRes=0x00007fff5fbfb540, result=0x00007fff5fbfbde0) at TCling.cxx:2053 frame #52: 0x000000010397a16e libCling.so`TCling::ProcessLine(this=0x0000000100a0de40, line=".X /opt/build/root_builds/master.debug/tutorials/thread/./threadsh2.C+", error=0x00007fff5fbfd694) at TCling.cxx:2170 frame #53: 0x0000000103984436 libCling.so`TCling::ProcessLineSynch(this=0x0000000100a0de40, line=".X /opt/build/root_builds/master.debug/tutorials/thread/./threadsh2.C+", error=0x00007fff5fbfd694) at TCling.cxx:3044 frame #54: 0x00000001001f3133 libCore.so`TApplication::ExecuteFile(file="threadsh2.C+", error=0x00007fff5fbfd694, keep=false) at TApplication.cxx:1143 frame #55: 0x00000001001f19e0 libCore.so`TApplication::ProcessFile(this=0x0000000100b113e0, file="threadsh2.C+", error=0x00007fff5fbfd694, keep=false) at TApplication.cxx:1015 frame #56: 0x00000001001f138f libCore.so`TApplication::ProcessLine(this=0x0000000100b113e0, line=".x threadsh2.C+", sync=false, err=0x00007fff5fbfd694) at TApplication.cxx:988 frame #57: 0x000000010009878d libRint.so`TRint::ProcessLineNr(this=0x0000000100b113e0, filestem="ROOT_cli_", line=".x threadsh2.C+", error=0x00007fff5fbfd694) at TRint.cxx:756 frame #58: 0x0000000100097daf libRint.so`TRint::Run(this=0x0000000100b113e0, retrn=false) at TRint.cxx:416 frame #59: 0x00000001000027a4 root.exe`main(argc=1, argv=0x00007fff5fbff780) at rmain.cxx:30 frame #60: 0x00007fffaafdb235 libdyld.dylib`start + 1 thread #12 frame #0: 0x00007fffab109bf2 libsystem_kernel.dylib`__psynch_cvwait + 10 frame #1: 0x00007fffab1f57fa libsystem_pthread.dylib`_pthread_cond_wait + 712 frame #2: 0x00007fffa9b734cd libc++.1.dylib`std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 47 frame #3: 0x0000000100f76b6f libThread.so`void std::__1::condition_variable_any::wait<std::__1::unique_lock<std::__1::mutex> >(this=0x0000000122753a28, __lock=0x0000700009f18898) at condition_variable:202 frame #4: 0x0000000100f697b4 libThread.so`ROOT::TReentrantRWLock<std::__1::mutex, ROOT::Internal::RecurseCounts>::WriteLock() [inlined] void std::__1::condition_variable_any::wait<std::__1::unique_lock<std::__1::mutex>, ROOT::TReentrantRWLock<std::__1::mutex, ROOT::Internal::RecurseCounts>::WriteLock()::'lambda'()>(this=0x0000000122753a28, __lock=0x0000700009f18898, __pred=(anonymous class) @ 0x0000700009f18a28)::'lambda'()) at condition_variable:211 frame #5: 0x0000000100f69790 libThread.so`ROOT::TReentrantRWLock<std::__1::mutex, ROOT::Internal::RecurseCounts>::WriteLock(this=0x00000001227539d8) at TReentrantRWLock.cxx:175 frame #6: 0x0000000100f5c779 libThread.so`ROOT::TRWMutexImp<std::__1::mutex, ROOT::Internal::RecurseCounts>::WriteLock(this=0x00000001227539d0) at TRWMutexImp.cxx:42 frame #7: 0x0000000100f57df6 libThread.so`ROOT::TVirtualRWMutex::Lock(this=0x00000001227539d0) at TVirtualRWMutex.h:52 frame #8: 0x00000001039b2dd9 libCling.so`TLockGuard::TLockGuard(this=0x0000700009f18b48, mutex=0x00000001227539d0) at TVirtualMutex.h:85 frame #9: 0x000000010397ba8d libCling.so`TLockGuard::TLockGuard(this=0x0000700009f18b48, mutex=0x00000001227539d0) at TVirtualMutex.h:85 frame #10: 0x00000001039aa152 libCling.so`TCling::ClassInfo_Factory(this=0x0000000100a0de40, all=true) const at TCling.cxx:7216 frame #11: 0x00000001004150ba libCore.so`TMethodCall::Init(this=0x0000700009f18d80, cl=0x0000000100af0470, method="Print", params="", objectIsConst=false) at TMethodCall.cxx:259 frame #12: 0x0000000100414ff3 libCore.so`TMethodCall::TMethodCall(this=0x0000700009f18d80, cl=0x0000000100af0470, method="Print", params="") at TMethodCall.cxx:62 frame #13: 0x000000010041519d libCore.so`TMethodCall::TMethodCall(this=0x0000700009f18d80, cl=0x0000000100af0470, method="Print", params="") at TMethodCall.cxx:61 frame #14: 0x0000000100fe471a threadsh2_C.so`handle1((null)=0x0000000000000000) at threadsh2.C:48 frame #15: 0x0000000100f55680 libThread.so`TThread::Function(ptr=0x0000000122754790) at TThread.cxx:821 frame #16: 0x00007fffab1f493b libsystem_pthread.dylib`_pthread_body + 180 frame #17: 0x00007fffab1f4887 libsystem_pthread.dylib`_pthread_start + 286 frame #18: 0x00007fffab1f408d libsystem_pthread.dylib`thread_start + 13
pcanal
referenced
this pull request
in pcanal/root
Feb 5, 2018
In the example below, thread #11 is waiting on the ‘AppKit lock’ while thread #1 is waiting on the ROOT read lock and thread #12 is waiting on the ROOT write lock. In thread #11, the ROOT write lock is taken/held by frame #9, TCanvas::Update, to ‘serialize’ the update to the windowing system. In thread #1, the ‘AppKit lock’ is likely taken/held by a frame in the #16 to root-project#40 range. This commit remove the dead lock by removing the unnecessary use of code needing the ROOT lock within code run under the AppKit lock so that in they case thread #1 no longer need to wait for the ROOT (read) lock. In addition it should be investigated whether the ROOT (write) lock should be taken in thread #1, frame 1 (TMacOSXSystem::ProcessPendingEvents) for the same reason it is taken in TCanvas::Update. thread #11 frame #0: 0x00007fffab109bf2 libsystem_kernel.dylib`__psynch_cvwait + 10 frame #1: 0x00007fffab1f57fa libsystem_pthread.dylib`_pthread_cond_wait + 712 frame #2: 0x00007fff93394e34 AppKit`-[NSViewHierarchyLock lockForReadingWithExceptionHandler:] + 287 frame #3: 0x00007fff934948ae AppKit`-[NSWindow _copyAcquiredViewHierarchyLock] + 126 frame #4: 0x00007fff9349442c AppKit`-[NSView lockFocusIfCanDraw] + 159 frame #5: 0x000000011c09063d libGCocoa.so`ROOT::MacOSX::X11::CommandBuffer::Flush(this=0x0000000100dbb080, impl=0x0000000100dbb000) at X11Buffer.mm:550 frame #6: 0x000000011c04e9c4 libGCocoa.so`TGCocoa::Update(this=0x0000000100ad1bc0, mode=1) at TGCocoa.mm:536 frame #7: 0x000000011c04ff3e libGCocoa.so`TGCocoa::UpdateWindow(this=0x0000000100ad1bc0, (null)=1) at TGCocoa.mm:776 frame #8: 0x000000011ad70827 libGpad.so`TCanvas::Flush(this=0x000000012274e740) at TCanvas.cxx:1096 frame #9: 0x000000011ad7830f libGpad.so`TCanvas::Update(this=0x000000012274e740) at TCanvas.cxx:2287 frame #10: 0x0000000100fe4e86 threadsh2_C.so`handle2((null)=0x0000000000000001) at threadsh2.C:105 frame #11: 0x0000000100f55680 libThread.so`TThread::Function(ptr=0x0000000122753b00) at TThread.cxx:821 frame #12: 0x00007fffab1f493b libsystem_pthread.dylib`_pthread_body + 180 frame #13: 0x00007fffab1f4887 libsystem_pthread.dylib`_pthread_start + 286 frame #14: 0x00007fffab1f408d libsystem_pthread.dylib`thread_start + 13 thread #1, queue = 'com.apple.main-thread', stop reason = signal SIGSTOP frame #0: 0x00007fffab109bf2 libsystem_kernel.dylib`__psynch_cvwait + 10 frame #1: 0x00007fffab1f57fa libsystem_pthread.dylib`_pthread_cond_wait + 712 frame #2: 0x00007fffa9b734cd libc++.1.dylib`std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 47 frame #3: 0x0000000100f76b6f libThread.so`void std::__1::condition_variable_any::wait<std::__1::unique_lock<std::__1::mutex> >(this=0x0000000122753a28, __lock=0x00007fff5fbf5cf8) at condition_variable:202 frame #4: 0x0000000100f6887e libThread.so`ROOT::TReentrantRWLock<std::__1::mutex, ROOT::Internal::RecurseCounts>::ReadLock() [inlined] void std::__1::condition_variable_any::wait<std::__1::unique_lock<std::__1::mutex>, ROOT::TReentrantRWLock<std::__1::mutex, ROOT::Internal::RecurseCounts>::ReadLock()::'lambda'()>(this=0x0000000122753a28, __lock=0x00007fff5fbf5cf8, __pred=(anonymous class) @ 0x00007fff5fbf5e08)::'lambda'()) at condition_variable:211 frame #5: 0x0000000100f68857 libThread.so`ROOT::TReentrantRWLock<std::__1::mutex, ROOT::Internal::RecurseCounts>::ReadLock(this=0x00000001227539d8) at TReentrantRWLock.cxx:95 frame #6: 0x0000000100f5c719 libThread.so`ROOT::TRWMutexImp<std::__1::mutex, ROOT::Internal::RecurseCounts>::ReadLock(this=0x00000001227539d0) at TRWMutexImp.cxx:33 frame #7: 0x00000001000f52d1 libCore.so`ROOT::TReadLockGuard::TReadLockGuard(this=0x00007fff5fbf5f48, mutex=0x00000001227539d0) at TVirtualRWMutex.h:89 frame #8: 0x00000001000f275d libCore.so`ROOT::TReadLockGuard::TReadLockGuard(this=0x00007fff5fbf5f48, mutex=0x00000001227539d0) at TVirtualRWMutex.h:88 frame #9: 0x00000001002fcebf libCore.so`THashTable::FindObject(this=0x0000000100b0e120, name="TGTextView") const at THashTable.cxx:242 frame #10: 0x00000001003a67fd libCore.so`TClass::GetClass(name="TGTextView", load=true, silent=true) at TClass.cxx:2900 frame #11: 0x00000001003c9e16 libCore.so`TClass::InheritsFrom(this=0x0000000118fe1250, classname="TGTextView") const at TClass.cxx:4683 frame #12: 0x000000010024cb6e libCore.so`TObject::InheritsFrom(this=0x0000000126908de0, classname="TGTextView") const at TObject.cxx:445 frame #13: 0x000000011c03e47f libGCocoa.so`ROOT::MacOSX::X11::ViewIsTextView(viewID=116) at QuartzWindow.mm:899 frame #14: 0x000000011c03e518 libGCocoa.so`ROOT::MacOSX::X11::ViewIsTextView(view=0x0000000126908ee0) at QuartzWindow.mm:907 frame #15: 0x000000011c04706c libGCocoa.so`::-[QuartzView drawRect:](self=0x0000000126908ee0, _cmd="drawRect:", dirtyRect=(origin = (x = 0, y = 0), size = (width = 29, height = 21))) at QuartzWindow.mm:2728 frame #16: 0x00007fff934a4f99 AppKit`-[NSView _drawRect:clip:] + 2276 frame #17: 0x00007fff934f4f2f AppKit`-[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] + 1753 frame #18: 0x00007fff934f539a AppKit`-[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] + 2884 frame #19: 0x00007fff934f539a AppKit`-[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] + 2884 frame #20: 0x00007fff934f539a AppKit`-[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] + 2884 frame #21: 0x00007fff934a2ad2 AppKit`-[NSView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:] + 837 frame #22: 0x00007fff934a22af AppKit`-[NSThemeFrame _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:] + 334 frame root-project#23: 0x00007fff934a06d8 AppKit`-[NSView _displayRectIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:] + 2452 frame root-project#24: 0x00007fff9349bfca AppKit`-[NSView displayIfNeeded] + 1748 frame root-project#25: 0x00007fff9349b8db AppKit`-[NSWindow displayIfNeeded] + 230 frame root-project#26: 0x00007fff93bfbcb4 AppKit`___NSWindowGetDisplayCycleObserver_block_invoke.6228 + 277 frame root-project#27: 0x00007fff9349b3b9 AppKit`__37+[NSDisplayCycle currentDisplayCycle]_block_invoke + 454 frame root-project#28: 0x00007fff9b384cc6 QuartzCore`CA::Transaction::run_commit_handlers(CATransactionPhase) + 46 frame root-project#29: 0x00007fff9b48e8ac QuartzCore`CA::Context::commit_transaction(CA::Transaction*) + 160 frame root-project#30: 0x00007fff9b3837a1 QuartzCore`CA::Transaction::commit() + 475 frame root-project#31: 0x00007fff9377e8b1 AppKit`__37+[NSDisplayCycle currentDisplayCycle]_block_invoke.31 + 323 frame root-project#32: 0x00007fff95874d37 CoreFoundation`__CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 23 frame root-project#33: 0x00007fff95874ca7 CoreFoundation`__CFRunLoopDoObservers + 391 frame root-project#34: 0x00007fff958556d9 CoreFoundation`__CFRunLoopRun + 873 frame root-project#35: 0x00007fff95855114 CoreFoundation`CFRunLoopRunSpecific + 420 frame root-project#36: 0x00007fff94db5ebc HIToolbox`RunCurrentEventLoopInMode + 240 frame root-project#37: 0x00007fff94db5bf9 HIToolbox`ReceiveNextEventCommon + 184 frame root-project#38: 0x00007fff94db5b26 HIToolbox`_BlockUntilNextEventMatchingListInModeWithFilter + 71 frame root-project#39: 0x00007fff9334ca54 AppKit`_DPSNextEvent + 1120 frame root-project#40: 0x00007fff93ac87ee AppKit`-[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 2796 frame root-project#41: 0x0000000100491031 libCore.so`TMacOSXSystem::ProcessPendingEvents(this=0x0000000100c06d60) at TMacOSXSystem.mm:473 frame root-project#42: 0x000000010049097d libCore.so`TMacOSXSystem::DispatchOneEvent(this=0x0000000100c06d60, pendingOnly=true) at TMacOSXSystem.mm:365 frame root-project#43: 0x0000000100294f4b libCore.so`TSystem::ProcessEvents(this=0x0000000100c06d60) at TSystem.cxx:429 frame root-project#44: 0x0000000100fe5844 threadsh2_C.so`threadsh2() at threadsh2.C:196 frame root-project#45: 0x0000000100fec06a frame root-project#46: 0x0000000103d7dc2f libCling.so`cling::IncrementalExecutor::executeWrapper(this=0x0000000100a1d410, function=(Data = "_Z15__cling_Un1Qu30Pv", Length = 21), returnValue=0x00007fff5fbfbde0) at IncrementalExecutor.h:196 frame root-project#47: 0x0000000103d7db1f libCling.so`cling::Interpreter::RunFunction(this=0x0000000100a0e3b0, FD=0x000000011780f6b0, res=0x00007fff5fbfbde0) at Interpreter.cpp:980 frame root-project#48: 0x0000000103d7a92a libCling.so`cling::Interpreter::EvaluateInternal(this=0x0000000100a0e3b0, input="threadsh2()", CO=CompilationOptions @ 0x00007fff5fbfaae8, V=0x00007fff5fbfbde0, T=0x0000000000000000, wrapPoint=44) at Interpreter.cpp:1232 frame root-project#49: 0x0000000103d79e27 libCling.so`cling::Interpreter::process(this=0x0000000100a0e3b0, input="threadsh2()", V=0x00007fff5fbfbde0, T=0x0000000000000000, disableValuePrinting=false) at Interpreter.cpp:684 frame root-project#50: 0x0000000103e552a5 libCling.so`cling::MetaProcessor::process(this=0x0000000100b65aa0, input_line=(Data = "threadsh2()", Length = 11), compRes=0x00007fff5fbfb540, result=0x00007fff5fbfbde0, disableValuePrinting=false) at MetaProcessor.cpp:341 frame root-project#51: 0x000000010397bd63 libCling.so`HandleInterpreterException(metaProcessor=0x0000000100b65aa0, input_line="threadsh2()", compRes=0x00007fff5fbfb540, result=0x00007fff5fbfbde0) at TCling.cxx:2053 frame root-project#52: 0x000000010397a16e libCling.so`TCling::ProcessLine(this=0x0000000100a0de40, line=".X /opt/build/root_builds/master.debug/tutorials/thread/./threadsh2.C+", error=0x00007fff5fbfd694) at TCling.cxx:2170 frame root-project#53: 0x0000000103984436 libCling.so`TCling::ProcessLineSynch(this=0x0000000100a0de40, line=".X /opt/build/root_builds/master.debug/tutorials/thread/./threadsh2.C+", error=0x00007fff5fbfd694) at TCling.cxx:3044 frame root-project#54: 0x00000001001f3133 libCore.so`TApplication::ExecuteFile(file="threadsh2.C+", error=0x00007fff5fbfd694, keep=false) at TApplication.cxx:1143 frame root-project#55: 0x00000001001f19e0 libCore.so`TApplication::ProcessFile(this=0x0000000100b113e0, file="threadsh2.C+", error=0x00007fff5fbfd694, keep=false) at TApplication.cxx:1015 frame root-project#56: 0x00000001001f138f libCore.so`TApplication::ProcessLine(this=0x0000000100b113e0, line=".x threadsh2.C+", sync=false, err=0x00007fff5fbfd694) at TApplication.cxx:988 frame root-project#57: 0x000000010009878d libRint.so`TRint::ProcessLineNr(this=0x0000000100b113e0, filestem="ROOT_cli_", line=".x threadsh2.C+", error=0x00007fff5fbfd694) at TRint.cxx:756 frame root-project#58: 0x0000000100097daf libRint.so`TRint::Run(this=0x0000000100b113e0, retrn=false) at TRint.cxx:416 frame root-project#59: 0x00000001000027a4 root.exe`main(argc=1, argv=0x00007fff5fbff780) at rmain.cxx:30 frame root-project#60: 0x00007fffaafdb235 libdyld.dylib`start + 1 thread #12 frame #0: 0x00007fffab109bf2 libsystem_kernel.dylib`__psynch_cvwait + 10 frame #1: 0x00007fffab1f57fa libsystem_pthread.dylib`_pthread_cond_wait + 712 frame #2: 0x00007fffa9b734cd libc++.1.dylib`std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 47 frame #3: 0x0000000100f76b6f libThread.so`void std::__1::condition_variable_any::wait<std::__1::unique_lock<std::__1::mutex> >(this=0x0000000122753a28, __lock=0x0000700009f18898) at condition_variable:202 frame #4: 0x0000000100f697b4 libThread.so`ROOT::TReentrantRWLock<std::__1::mutex, ROOT::Internal::RecurseCounts>::WriteLock() [inlined] void std::__1::condition_variable_any::wait<std::__1::unique_lock<std::__1::mutex>, ROOT::TReentrantRWLock<std::__1::mutex, ROOT::Internal::RecurseCounts>::WriteLock()::'lambda'()>(this=0x0000000122753a28, __lock=0x0000700009f18898, __pred=(anonymous class) @ 0x0000700009f18a28)::'lambda'()) at condition_variable:211 frame #5: 0x0000000100f69790 libThread.so`ROOT::TReentrantRWLock<std::__1::mutex, ROOT::Internal::RecurseCounts>::WriteLock(this=0x00000001227539d8) at TReentrantRWLock.cxx:175 frame #6: 0x0000000100f5c779 libThread.so`ROOT::TRWMutexImp<std::__1::mutex, ROOT::Internal::RecurseCounts>::WriteLock(this=0x00000001227539d0) at TRWMutexImp.cxx:42 frame #7: 0x0000000100f57df6 libThread.so`ROOT::TVirtualRWMutex::Lock(this=0x00000001227539d0) at TVirtualRWMutex.h:52 frame #8: 0x00000001039b2dd9 libCling.so`TLockGuard::TLockGuard(this=0x0000700009f18b48, mutex=0x00000001227539d0) at TVirtualMutex.h:85 frame #9: 0x000000010397ba8d libCling.so`TLockGuard::TLockGuard(this=0x0000700009f18b48, mutex=0x00000001227539d0) at TVirtualMutex.h:85 frame #10: 0x00000001039aa152 libCling.so`TCling::ClassInfo_Factory(this=0x0000000100a0de40, all=true) const at TCling.cxx:7216 frame #11: 0x00000001004150ba libCore.so`TMethodCall::Init(this=0x0000700009f18d80, cl=0x0000000100af0470, method="Print", params="", objectIsConst=false) at TMethodCall.cxx:259 frame #12: 0x0000000100414ff3 libCore.so`TMethodCall::TMethodCall(this=0x0000700009f18d80, cl=0x0000000100af0470, method="Print", params="") at TMethodCall.cxx:62 frame #13: 0x000000010041519d libCore.so`TMethodCall::TMethodCall(this=0x0000700009f18d80, cl=0x0000000100af0470, method="Print", params="") at TMethodCall.cxx:61 frame #14: 0x0000000100fe471a threadsh2_C.so`handle1((null)=0x0000000000000000) at threadsh2.C:48 frame #15: 0x0000000100f55680 libThread.so`TThread::Function(ptr=0x0000000122754790) at TThread.cxx:821 frame #16: 0x00007fffab1f493b libsystem_pthread.dylib`_pthread_body + 180 frame #17: 0x00007fffab1f4887 libsystem_pthread.dylib`_pthread_start + 286 frame #18: 0x00007fffab1f408d libsystem_pthread.dylib`thread_start + 13
pcanal
added a commit
that referenced
this pull request
Feb 5, 2018
In the example below, thread #11 is waiting on the ‘AppKit lock’ while thread #1 is waiting on the ROOT read lock and thread #12 is waiting on the ROOT write lock. In thread #11, the ROOT write lock is taken/held by frame #9, TCanvas::Update, to ‘serialize’ the update to the windowing system. In thread #1, the ‘AppKit lock’ is likely taken/held by a frame in the #16 to #40 range. This commit remove the dead lock by removing the unnecessary use of code needing the ROOT lock within code run under the AppKit lock so that in they case thread #1 no longer need to wait for the ROOT (read) lock. In addition it should be investigated whether the ROOT (write) lock should be taken in thread #1, frame 1 (TMacOSXSystem::ProcessPendingEvents) for the same reason it is taken in TCanvas::Update. thread #11 frame #0: 0x00007fffab109bf2 libsystem_kernel.dylib`__psynch_cvwait + 10 frame #1: 0x00007fffab1f57fa libsystem_pthread.dylib`_pthread_cond_wait + 712 frame #2: 0x00007fff93394e34 AppKit`-[NSViewHierarchyLock lockForReadingWithExceptionHandler:] + 287 frame #3: 0x00007fff934948ae AppKit`-[NSWindow _copyAcquiredViewHierarchyLock] + 126 frame #4: 0x00007fff9349442c AppKit`-[NSView lockFocusIfCanDraw] + 159 frame #5: 0x000000011c09063d libGCocoa.so`ROOT::MacOSX::X11::CommandBuffer::Flush(this=0x0000000100dbb080, impl=0x0000000100dbb000) at X11Buffer.mm:550 frame #6: 0x000000011c04e9c4 libGCocoa.so`TGCocoa::Update(this=0x0000000100ad1bc0, mode=1) at TGCocoa.mm:536 frame #7: 0x000000011c04ff3e libGCocoa.so`TGCocoa::UpdateWindow(this=0x0000000100ad1bc0, (null)=1) at TGCocoa.mm:776 frame #8: 0x000000011ad70827 libGpad.so`TCanvas::Flush(this=0x000000012274e740) at TCanvas.cxx:1096 frame #9: 0x000000011ad7830f libGpad.so`TCanvas::Update(this=0x000000012274e740) at TCanvas.cxx:2287 frame #10: 0x0000000100fe4e86 threadsh2_C.so`handle2((null)=0x0000000000000001) at threadsh2.C:105 frame #11: 0x0000000100f55680 libThread.so`TThread::Function(ptr=0x0000000122753b00) at TThread.cxx:821 frame #12: 0x00007fffab1f493b libsystem_pthread.dylib`_pthread_body + 180 frame #13: 0x00007fffab1f4887 libsystem_pthread.dylib`_pthread_start + 286 frame #14: 0x00007fffab1f408d libsystem_pthread.dylib`thread_start + 13 thread #1, queue = 'com.apple.main-thread', stop reason = signal SIGSTOP frame #0: 0x00007fffab109bf2 libsystem_kernel.dylib`__psynch_cvwait + 10 frame #1: 0x00007fffab1f57fa libsystem_pthread.dylib`_pthread_cond_wait + 712 frame #2: 0x00007fffa9b734cd libc++.1.dylib`std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 47 frame #3: 0x0000000100f76b6f libThread.so`void std::__1::condition_variable_any::wait<std::__1::unique_lock<std::__1::mutex> >(this=0x0000000122753a28, __lock=0x00007fff5fbf5cf8) at condition_variable:202 frame #4: 0x0000000100f6887e libThread.so`ROOT::TReentrantRWLock<std::__1::mutex, ROOT::Internal::RecurseCounts>::ReadLock() [inlined] void std::__1::condition_variable_any::wait<std::__1::unique_lock<std::__1::mutex>, ROOT::TReentrantRWLock<std::__1::mutex, ROOT::Internal::RecurseCounts>::ReadLock()::'lambda'()>(this=0x0000000122753a28, __lock=0x00007fff5fbf5cf8, __pred=(anonymous class) @ 0x00007fff5fbf5e08)::'lambda'()) at condition_variable:211 frame #5: 0x0000000100f68857 libThread.so`ROOT::TReentrantRWLock<std::__1::mutex, ROOT::Internal::RecurseCounts>::ReadLock(this=0x00000001227539d8) at TReentrantRWLock.cxx:95 frame #6: 0x0000000100f5c719 libThread.so`ROOT::TRWMutexImp<std::__1::mutex, ROOT::Internal::RecurseCounts>::ReadLock(this=0x00000001227539d0) at TRWMutexImp.cxx:33 frame #7: 0x00000001000f52d1 libCore.so`ROOT::TReadLockGuard::TReadLockGuard(this=0x00007fff5fbf5f48, mutex=0x00000001227539d0) at TVirtualRWMutex.h:89 frame #8: 0x00000001000f275d libCore.so`ROOT::TReadLockGuard::TReadLockGuard(this=0x00007fff5fbf5f48, mutex=0x00000001227539d0) at TVirtualRWMutex.h:88 frame #9: 0x00000001002fcebf libCore.so`THashTable::FindObject(this=0x0000000100b0e120, name="TGTextView") const at THashTable.cxx:242 frame #10: 0x00000001003a67fd libCore.so`TClass::GetClass(name="TGTextView", load=true, silent=true) at TClass.cxx:2900 frame #11: 0x00000001003c9e16 libCore.so`TClass::InheritsFrom(this=0x0000000118fe1250, classname="TGTextView") const at TClass.cxx:4683 frame #12: 0x000000010024cb6e libCore.so`TObject::InheritsFrom(this=0x0000000126908de0, classname="TGTextView") const at TObject.cxx:445 frame #13: 0x000000011c03e47f libGCocoa.so`ROOT::MacOSX::X11::ViewIsTextView(viewID=116) at QuartzWindow.mm:899 frame #14: 0x000000011c03e518 libGCocoa.so`ROOT::MacOSX::X11::ViewIsTextView(view=0x0000000126908ee0) at QuartzWindow.mm:907 frame #15: 0x000000011c04706c libGCocoa.so`::-[QuartzView drawRect:](self=0x0000000126908ee0, _cmd="drawRect:", dirtyRect=(origin = (x = 0, y = 0), size = (width = 29, height = 21))) at QuartzWindow.mm:2728 frame #16: 0x00007fff934a4f99 AppKit`-[NSView _drawRect:clip:] + 2276 frame #17: 0x00007fff934f4f2f AppKit`-[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] + 1753 frame #18: 0x00007fff934f539a AppKit`-[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] + 2884 frame #19: 0x00007fff934f539a AppKit`-[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] + 2884 frame #20: 0x00007fff934f539a AppKit`-[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] + 2884 frame #21: 0x00007fff934a2ad2 AppKit`-[NSView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:] + 837 frame #22: 0x00007fff934a22af AppKit`-[NSThemeFrame _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:] + 334 frame #23: 0x00007fff934a06d8 AppKit`-[NSView _displayRectIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:] + 2452 frame #24: 0x00007fff9349bfca AppKit`-[NSView displayIfNeeded] + 1748 frame #25: 0x00007fff9349b8db AppKit`-[NSWindow displayIfNeeded] + 230 frame #26: 0x00007fff93bfbcb4 AppKit`___NSWindowGetDisplayCycleObserver_block_invoke.6228 + 277 frame #27: 0x00007fff9349b3b9 AppKit`__37+[NSDisplayCycle currentDisplayCycle]_block_invoke + 454 frame #28: 0x00007fff9b384cc6 QuartzCore`CA::Transaction::run_commit_handlers(CATransactionPhase) + 46 frame #29: 0x00007fff9b48e8ac QuartzCore`CA::Context::commit_transaction(CA::Transaction*) + 160 frame #30: 0x00007fff9b3837a1 QuartzCore`CA::Transaction::commit() + 475 frame #31: 0x00007fff9377e8b1 AppKit`__37+[NSDisplayCycle currentDisplayCycle]_block_invoke.31 + 323 frame #32: 0x00007fff95874d37 CoreFoundation`__CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 23 frame #33: 0x00007fff95874ca7 CoreFoundation`__CFRunLoopDoObservers + 391 frame #34: 0x00007fff958556d9 CoreFoundation`__CFRunLoopRun + 873 frame #35: 0x00007fff95855114 CoreFoundation`CFRunLoopRunSpecific + 420 frame #36: 0x00007fff94db5ebc HIToolbox`RunCurrentEventLoopInMode + 240 frame #37: 0x00007fff94db5bf9 HIToolbox`ReceiveNextEventCommon + 184 frame #38: 0x00007fff94db5b26 HIToolbox`_BlockUntilNextEventMatchingListInModeWithFilter + 71 frame #39: 0x00007fff9334ca54 AppKit`_DPSNextEvent + 1120 frame #40: 0x00007fff93ac87ee AppKit`-[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 2796 frame #41: 0x0000000100491031 libCore.so`TMacOSXSystem::ProcessPendingEvents(this=0x0000000100c06d60) at TMacOSXSystem.mm:473 frame #42: 0x000000010049097d libCore.so`TMacOSXSystem::DispatchOneEvent(this=0x0000000100c06d60, pendingOnly=true) at TMacOSXSystem.mm:365 frame #43: 0x0000000100294f4b libCore.so`TSystem::ProcessEvents(this=0x0000000100c06d60) at TSystem.cxx:429 frame #44: 0x0000000100fe5844 threadsh2_C.so`threadsh2() at threadsh2.C:196 frame #45: 0x0000000100fec06a frame #46: 0x0000000103d7dc2f libCling.so`cling::IncrementalExecutor::executeWrapper(this=0x0000000100a1d410, function=(Data = "_Z15__cling_Un1Qu30Pv", Length = 21), returnValue=0x00007fff5fbfbde0) at IncrementalExecutor.h:196 frame #47: 0x0000000103d7db1f libCling.so`cling::Interpreter::RunFunction(this=0x0000000100a0e3b0, FD=0x000000011780f6b0, res=0x00007fff5fbfbde0) at Interpreter.cpp:980 frame #48: 0x0000000103d7a92a libCling.so`cling::Interpreter::EvaluateInternal(this=0x0000000100a0e3b0, input="threadsh2()", CO=CompilationOptions @ 0x00007fff5fbfaae8, V=0x00007fff5fbfbde0, T=0x0000000000000000, wrapPoint=44) at Interpreter.cpp:1232 frame #49: 0x0000000103d79e27 libCling.so`cling::Interpreter::process(this=0x0000000100a0e3b0, input="threadsh2()", V=0x00007fff5fbfbde0, T=0x0000000000000000, disableValuePrinting=false) at Interpreter.cpp:684 frame #50: 0x0000000103e552a5 libCling.so`cling::MetaProcessor::process(this=0x0000000100b65aa0, input_line=(Data = "threadsh2()", Length = 11), compRes=0x00007fff5fbfb540, result=0x00007fff5fbfbde0, disableValuePrinting=false) at MetaProcessor.cpp:341 frame #51: 0x000000010397bd63 libCling.so`HandleInterpreterException(metaProcessor=0x0000000100b65aa0, input_line="threadsh2()", compRes=0x00007fff5fbfb540, result=0x00007fff5fbfbde0) at TCling.cxx:2053 frame #52: 0x000000010397a16e libCling.so`TCling::ProcessLine(this=0x0000000100a0de40, line=".X /opt/build/root_builds/master.debug/tutorials/thread/./threadsh2.C+", error=0x00007fff5fbfd694) at TCling.cxx:2170 frame #53: 0x0000000103984436 libCling.so`TCling::ProcessLineSynch(this=0x0000000100a0de40, line=".X /opt/build/root_builds/master.debug/tutorials/thread/./threadsh2.C+", error=0x00007fff5fbfd694) at TCling.cxx:3044 frame #54: 0x00000001001f3133 libCore.so`TApplication::ExecuteFile(file="threadsh2.C+", error=0x00007fff5fbfd694, keep=false) at TApplication.cxx:1143 frame #55: 0x00000001001f19e0 libCore.so`TApplication::ProcessFile(this=0x0000000100b113e0, file="threadsh2.C+", error=0x00007fff5fbfd694, keep=false) at TApplication.cxx:1015 frame #56: 0x00000001001f138f libCore.so`TApplication::ProcessLine(this=0x0000000100b113e0, line=".x threadsh2.C+", sync=false, err=0x00007fff5fbfd694) at TApplication.cxx:988 frame #57: 0x000000010009878d libRint.so`TRint::ProcessLineNr(this=0x0000000100b113e0, filestem="ROOT_cli_", line=".x threadsh2.C+", error=0x00007fff5fbfd694) at TRint.cxx:756 frame #58: 0x0000000100097daf libRint.so`TRint::Run(this=0x0000000100b113e0, retrn=false) at TRint.cxx:416 frame #59: 0x00000001000027a4 root.exe`main(argc=1, argv=0x00007fff5fbff780) at rmain.cxx:30 frame #60: 0x00007fffaafdb235 libdyld.dylib`start + 1 thread #12 frame #0: 0x00007fffab109bf2 libsystem_kernel.dylib`__psynch_cvwait + 10 frame #1: 0x00007fffab1f57fa libsystem_pthread.dylib`_pthread_cond_wait + 712 frame #2: 0x00007fffa9b734cd libc++.1.dylib`std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 47 frame #3: 0x0000000100f76b6f libThread.so`void std::__1::condition_variable_any::wait<std::__1::unique_lock<std::__1::mutex> >(this=0x0000000122753a28, __lock=0x0000700009f18898) at condition_variable:202 frame #4: 0x0000000100f697b4 libThread.so`ROOT::TReentrantRWLock<std::__1::mutex, ROOT::Internal::RecurseCounts>::WriteLock() [inlined] void std::__1::condition_variable_any::wait<std::__1::unique_lock<std::__1::mutex>, ROOT::TReentrantRWLock<std::__1::mutex, ROOT::Internal::RecurseCounts>::WriteLock()::'lambda'()>(this=0x0000000122753a28, __lock=0x0000700009f18898, __pred=(anonymous class) @ 0x0000700009f18a28)::'lambda'()) at condition_variable:211 frame #5: 0x0000000100f69790 libThread.so`ROOT::TReentrantRWLock<std::__1::mutex, ROOT::Internal::RecurseCounts>::WriteLock(this=0x00000001227539d8) at TReentrantRWLock.cxx:175 frame #6: 0x0000000100f5c779 libThread.so`ROOT::TRWMutexImp<std::__1::mutex, ROOT::Internal::RecurseCounts>::WriteLock(this=0x00000001227539d0) at TRWMutexImp.cxx:42 frame #7: 0x0000000100f57df6 libThread.so`ROOT::TVirtualRWMutex::Lock(this=0x00000001227539d0) at TVirtualRWMutex.h:52 frame #8: 0x00000001039b2dd9 libCling.so`TLockGuard::TLockGuard(this=0x0000700009f18b48, mutex=0x00000001227539d0) at TVirtualMutex.h:85 frame #9: 0x000000010397ba8d libCling.so`TLockGuard::TLockGuard(this=0x0000700009f18b48, mutex=0x00000001227539d0) at TVirtualMutex.h:85 frame #10: 0x00000001039aa152 libCling.so`TCling::ClassInfo_Factory(this=0x0000000100a0de40, all=true) const at TCling.cxx:7216 frame #11: 0x00000001004150ba libCore.so`TMethodCall::Init(this=0x0000700009f18d80, cl=0x0000000100af0470, method="Print", params="", objectIsConst=false) at TMethodCall.cxx:259 frame #12: 0x0000000100414ff3 libCore.so`TMethodCall::TMethodCall(this=0x0000700009f18d80, cl=0x0000000100af0470, method="Print", params="") at TMethodCall.cxx:62 frame #13: 0x000000010041519d libCore.so`TMethodCall::TMethodCall(this=0x0000700009f18d80, cl=0x0000000100af0470, method="Print", params="") at TMethodCall.cxx:61 frame #14: 0x0000000100fe471a threadsh2_C.so`handle1((null)=0x0000000000000000) at threadsh2.C:48 frame #15: 0x0000000100f55680 libThread.so`TThread::Function(ptr=0x0000000122754790) at TThread.cxx:821 frame #16: 0x00007fffab1f493b libsystem_pthread.dylib`_pthread_body + 180 frame #17: 0x00007fffab1f4887 libsystem_pthread.dylib`_pthread_start + 286 frame #18: 0x00007fffab1f408d libsystem_pthread.dylib`thread_start + 13
pcanal
referenced
this pull request
in pcanal/root
Oct 9, 2018
…railing transactions. With the current code, cling::Interpreter::compileFunction will get confused by transaction created during the callbacks executed during the cling::IncrementalParser::commitTransaction of the main transaction. The work-around is to avoid the need for the transaction by marking the class TGlobal has been guaranteed to have a proper Hash vs RecursiveRemove setup thus avoid the need to check it at run-time (by JIT code) Reproducer: With a main composed of 'only': int main(int argc, char ** argv) { char const * class_string = (argc == 2) ? argv[1] : "std::vector<int>"; auto const result [[gnu::unused]] = TClass::GetClass(class_string); return 0; } which is a representation of real use case (in a more complex setup) in ART. We were getting: Error in <TClingCallFunc::make_wrapper>: Failed to compile ==== SOURCE BEGIN ==== #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wformat-security" __attribute__((used)) extern "C" void __cf_0(void* obj, int nargs, void** args, void* ret) { if (ret) { (*(TStreamerInfo**)ret) = new TStreamerInfo(); return; } else { new TStreamerInfo(); return; } } #pragma clang diagnostic pop ==== SOURCE END ==== Error in <TClingCallFunc::ExecT>: Called with no wrapper, not implemented! Error in <TVirtualStreamerInfo::Factory>: The plugin handler for TVirtualStreamerInfo was found but failed to create the factory object! The reason is that during TClingCallFunc::make_wrapper, the call to cling::Interpreter::compileFunction ends with: if (const llvm::GlobalValue* GV = getLastTransaction()->getModule()->getNamedValue(name)) However in the 'broken' case, the getLastTransaction does not return the transaction for the code being compiled by DeclareCFunction but instead the one used/created at: #0 cling::IncrementalParser::endTransaction (this=0x4a2980, T=0x8c0fb0) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/interpreter/cling/lib/Interpreter/IncrementalParser.cpp:345 #1 0x00007fffeebc7899 in cling::Interpreter::PushTransactionRAII::pop (this=0x7fffffffcb00) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/interpreter/cling/lib/Interpreter/Interpreter.cpp:111 #2 0x00007fffeebc785e in cling::Interpreter::PushTransactionRAII::~PushTransactionRAII (this=0x7fffffffcb00, __in_chrg=<optimized out>) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/interpreter/cling/lib/Interpreter/Interpreter.cpp:106 #3 0x00007fffeebeb659 in cling::LookupHelper::findScope (this=0x4a9dd0, className=..., diagOnOff=cling::LookupHelper::NoDiagnostics, resultType=0x7fffffffcd08, instantiateTemplate=false) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/interpreter/cling/lib/Interpreter/LookupHelper.cpp:466 #4 0x00007fffeeabe0df in TCling::CheckClassInfo (this=0x4a0550, name=<optimized out>, autoload=<optimized out>, isClassOrNamespaceOnly=<optimized out>) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/metacling/src/TCling.cxx:3630 #5 0x00007ffff7c3040d in TClass::Init (this=this@entry=0xdafd20, name=name@entry=0x7ffff7cb7638 "TGlobal", cversion=cversion@entry=2, typeinfo=typeinfo@entry=0x7ffff7d8b6d8 <typeinfo for TGlobal>, isa=isa@entry=0x477430, dfil=dfil@entry=0x7ffff7cb8cab "TGlobal.h", ifil=<optimized out>, dl=<optimized out>, il=<optimized out>, givenInfo=<optimized out>, silent=<optimized out>) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/meta/src/TClass.cxx:1431 #6 0x00007ffff7c3a1b8 in TClass::TClass (this=0xdafd20, name=0x7ffff7cb7638 "TGlobal", cversion=<optimized out>, info=..., isa=0x477430, dfil=0x7ffff7cb8cab "TGlobal.h", ifil=0x7ffff7cccf88 "/local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/meta/src/TGlobal.cxx", dl=27, il=25, silent=false) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/meta/src/TClass.cxx:1273 #7 0x00007ffff7c3a72a in ROOT::CreateClass (cname=0x7ffff7cb7638 "TGlobal", id=id@entry=2, info=..., isa=isa@entry=0x477430, dfil=dfil@entry=0x7ffff7cb8cab "TGlobal.h", ifil=ifil@entry=0x7ffff7cccf88 "/local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/meta/src/TGlobal.cxx", dl=27, il=25) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/meta/src/TClass.cxx:5607 #8 0x00007ffff7c4b552 in ROOT::Internal::TDefaultInitBehavior::CreateClass (il=25, dl=27, ifil=0x7ffff7cccf88 "/local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/meta/src/TGlobal.cxx", dfil=0x7ffff7cb8cab "TGlobal.h", isa=0x477430, info=..., id=2, cname=<optimized out>, this=0x7ffff7da7508 <ROOT::Internal::DefineBehavior(void*, void*)::theDefault>) at /home/pcanal/root_builds/v6-14-00-patches/opt/include/Rtypes.h:176 #9 ROOT::TGenericClassInfo::GetClass (this=0x7ffff7dab660 <ROOT::GenerateInitInstanceLocal(TGlobal const*)::instance>) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/meta/src/TGenericClassInfo.cxx:250 #10 0x00007ffff7b1a2d8 in TGlobal::Class () at /home/pcanal/root_builds/v6-14-00-patches/opt/core/base/G__Core.cxx:17156 #11 0x00007ffff7ac01de in TGlobal::IsA (this=0xee3bc0) at /home/pcanal/root_builds/v6-14-00-patches/opt/include/TGlobal.h:48 #12 TGlobal::CheckTObjectHashConsistency (this=0xee3bc0) at /home/pcanal/root_builds/v6-14-00-patches/opt/include/TGlobal.h:48 #13 0x00007ffff7be9dcd in TObject::CheckedHash (this=0xee3bc0) at /home/pcanal/root_builds/v6-14-00-patches/opt/include/TObject.h:314 #14 THashTable::GetCheckedHashValue (this=0xe65a20, obj=0xee3bc0) at /home/pcanal/root_builds/v6-14-00-patches/opt/include/THashTable.h:94 #15 THashTable::Add (this=0xe65a20, obj=0xee3bc0) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/cont/src/THashTable.cxx:96 #16 0x00007ffff7be6bf1 in THashList::AddLast (this=this@entry=0x5be690, obj=obj@entry=0xee3bc0) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/cont/src/THashList.cxx:100 #17 0x00007ffff7c4e0d1 in TListOfDataMembers::AddLast (this=0x5be690, obj=0xee3bc0) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/meta/src/TListOfDataMembers.cxx:103 #18 0x00007ffff7ab8785 in TList::Add (obj=0xee3bc0, this=0x5be690) at /home/pcanal/root_builds/v6-14-00-patches/opt/include/TList.h:87 #19 TROOT::GetListOfGlobals (this=0x7ffff7da7a60 <ROOT::Internal::GetROOT1()::alloc>, load=load@entry=false) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/base/src/TROOT.cxx:1767 #20 0x00007fffeeab1058 in TCling::HandleNewDecl (this=0x4a0550, DV=0xedf238, isDeserialized=isDeserialized@entry=true, modifiedTClasses=...) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/metacling/src/TCling.cxx:555 #21 0x00007fffeeabb785 in TCling::UpdateListsOnCommitted (this=0x4a0550, T=...) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/metacling/src/TCling.cxx:6115 #22 0x00007fffeebd0103 in cling::MultiplexInterpreterCallbacks::TransactionCommitted (this=0x57fe20, T=...) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/interpreter/cling/lib/Interpreter/MultiplexInterpreterCallbacks.h:76 root-project#23 0x00007fffeed05d71 in cling::IncrementalParser::commitTransaction (this=0x4a2980, PRT=..., ClearDiagClient=true) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/interpreter/cling/lib/Interpreter/IncrementalParser.cpp:532 root-project#24 0x00007fffeed06399 in cling::IncrementalParser::Compile (this=0x4a2980, input=..., Opts=...) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/interpreter/cling/lib/Interpreter/IncrementalParser.cpp:663 root-project#25 0x00007fffeebcbc4e in cling::Interpreter::DeclareInternal (this=0x4a0f30, input=..., CO=..., T=0x7fffffffd680) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/interpreter/cling/lib/Interpreter/Interpreter.cpp:1195 root-project#26 0x00007fffeebca8e8 in cling::Interpreter::declare (this=0x4a0f30, input=..., T=0x7fffffffd680) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/interpreter/cling/lib/Interpreter/Interpreter.cpp:823 root-project#27 0x00007fffeebcb560 in cling::Interpreter::DeclareCFunction (this=0x4a0f30, name=..., code=..., withAccessControl=true) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/interpreter/cling/lib/Interpreter/Interpreter.cpp:1096 root-project#28 0x00007fffeebcb862 in cling::Interpreter::compileFunction (this=0x4a0f30, name=..., code=..., ifUnique=false, withAccessControl=true) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/interpreter/cling/lib/Interpreter/Interpreter.cpp:1140 root-project#29 0x00007fffeeafb83c in TClingCallFunc::compile_wrapper (withAccessControl=true, wrapper=..., wrapper_name=..., this=0xcf3c10) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/metacling/src/TClingCallFunc.cxx:270 root-project#30 TClingCallFunc::make_wrapper (this=this@entry=0xcf3c10) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/metacling/src/TClingCallFunc.cxx:1096 root-project#31 0x00007fffeeafbcb8 in TClingCallFunc::IFacePtr (this=this@entry=0xcf3c10) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/metacling/src/TClingCallFunc.cxx:2233 root-project#32 0x00007fffeeafbe83 in TClingCallFunc::ExecT<long> (address=0x0, this=0xcf3c10) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/metacling/src/TClingCallFunc.cxx:2045 root-project#33 TClingCallFunc::ExecInt (this=0xcf3c10, address=0x0) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/metacling/src/TClingCallFunc.cxx:2065 root-project#34 0x00007ffff7c56e8d in TMethodCall::Execute (this=0xd97710, object=<optimized out>, retLong=@0x7fffffffd958: 0) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/meta/src/TMethodCall.cxx:457 root-project#35 0x0000000000401009 in TMethodCall::Execute(long&) () root-project#36 0x00000000004010ea in long TPluginHandler::ExecPluginImpl<>() () root-project#37 0x000000000040106d in long TPluginHandler::ExecPlugin<>(int) () root-project#38 0x0000000000400e21 in mytest() () root-project#39 0x0000000000400e92 in main ()
pcanal
referenced
this pull request
in pcanal/root
Oct 9, 2018
…railing transactions. With the current code, cling::Interpreter::compileFunction will get confused by transaction created during the callbacks executed during the cling::IncrementalParser::commitTransaction of the main transaction. The work-around is to avoid the need for the transaction by marking the class TGlobal has been guaranteed to have a proper Hash vs RecursiveRemove setup thus avoid the need to check it at run-time (by JIT code) Reproducer: With a main composed of 'only': int main(int argc, char ** argv) { char const * class_string = (argc == 2) ? argv[1] : "std::vector<int>"; auto const result [[gnu::unused]] = TClass::GetClass(class_string); return 0; } which is a representation of real use case (in a more complex setup) in ART. We were getting: Error in <TClingCallFunc::make_wrapper>: Failed to compile ==== SOURCE BEGIN ==== #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wformat-security" __attribute__((used)) extern "C" void __cf_0(void* obj, int nargs, void** args, void* ret) { if (ret) { (*(TStreamerInfo**)ret) = new TStreamerInfo(); return; } else { new TStreamerInfo(); return; } } #pragma clang diagnostic pop ==== SOURCE END ==== Error in <TClingCallFunc::ExecT>: Called with no wrapper, not implemented! Error in <TVirtualStreamerInfo::Factory>: The plugin handler for TVirtualStreamerInfo was found but failed to create the factory object! The reason is that during TClingCallFunc::make_wrapper, the call to cling::Interpreter::compileFunction ends with: if (const llvm::GlobalValue* GV = getLastTransaction()->getModule()->getNamedValue(name)) However in the 'broken' case, the getLastTransaction does not return the transaction for the code being compiled by DeclareCFunction but instead the one used/created at: #0 cling::IncrementalParser::endTransaction (this=0x4a2980, T=0x8c0fb0) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/interpreter/cling/lib/Interpreter/IncrementalParser.cpp:345 #1 0x00007fffeebc7899 in cling::Interpreter::PushTransactionRAII::pop (this=0x7fffffffcb00) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/interpreter/cling/lib/Interpreter/Interpreter.cpp:111 #2 0x00007fffeebc785e in cling::Interpreter::PushTransactionRAII::~PushTransactionRAII (this=0x7fffffffcb00, __in_chrg=<optimized out>) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/interpreter/cling/lib/Interpreter/Interpreter.cpp:106 #3 0x00007fffeebeb659 in cling::LookupHelper::findScope (this=0x4a9dd0, className=..., diagOnOff=cling::LookupHelper::NoDiagnostics, resultType=0x7fffffffcd08, instantiateTemplate=false) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/interpreter/cling/lib/Interpreter/LookupHelper.cpp:466 #4 0x00007fffeeabe0df in TCling::CheckClassInfo (this=0x4a0550, name=<optimized out>, autoload=<optimized out>, isClassOrNamespaceOnly=<optimized out>) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/metacling/src/TCling.cxx:3630 #5 0x00007ffff7c3040d in TClass::Init (this=this@entry=0xdafd20, name=name@entry=0x7ffff7cb7638 "TGlobal", cversion=cversion@entry=2, typeinfo=typeinfo@entry=0x7ffff7d8b6d8 <typeinfo for TGlobal>, isa=isa@entry=0x477430, dfil=dfil@entry=0x7ffff7cb8cab "TGlobal.h", ifil=<optimized out>, dl=<optimized out>, il=<optimized out>, givenInfo=<optimized out>, silent=<optimized out>) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/meta/src/TClass.cxx:1431 #6 0x00007ffff7c3a1b8 in TClass::TClass (this=0xdafd20, name=0x7ffff7cb7638 "TGlobal", cversion=<optimized out>, info=..., isa=0x477430, dfil=0x7ffff7cb8cab "TGlobal.h", ifil=0x7ffff7cccf88 "/local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/meta/src/TGlobal.cxx", dl=27, il=25, silent=false) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/meta/src/TClass.cxx:1273 #7 0x00007ffff7c3a72a in ROOT::CreateClass (cname=0x7ffff7cb7638 "TGlobal", id=id@entry=2, info=..., isa=isa@entry=0x477430, dfil=dfil@entry=0x7ffff7cb8cab "TGlobal.h", ifil=ifil@entry=0x7ffff7cccf88 "/local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/meta/src/TGlobal.cxx", dl=27, il=25) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/meta/src/TClass.cxx:5607 #8 0x00007ffff7c4b552 in ROOT::Internal::TDefaultInitBehavior::CreateClass (il=25, dl=27, ifil=0x7ffff7cccf88 "/local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/meta/src/TGlobal.cxx", dfil=0x7ffff7cb8cab "TGlobal.h", isa=0x477430, info=..., id=2, cname=<optimized out>, this=0x7ffff7da7508 <ROOT::Internal::DefineBehavior(void*, void*)::theDefault>) at /home/pcanal/root_builds/v6-14-00-patches/opt/include/Rtypes.h:176 #9 ROOT::TGenericClassInfo::GetClass (this=0x7ffff7dab660 <ROOT::GenerateInitInstanceLocal(TGlobal const*)::instance>) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/meta/src/TGenericClassInfo.cxx:250 #10 0x00007ffff7b1a2d8 in TGlobal::Class () at /home/pcanal/root_builds/v6-14-00-patches/opt/core/base/G__Core.cxx:17156 #11 0x00007ffff7ac01de in TGlobal::IsA (this=0xee3bc0) at /home/pcanal/root_builds/v6-14-00-patches/opt/include/TGlobal.h:48 #12 TGlobal::CheckTObjectHashConsistency (this=0xee3bc0) at /home/pcanal/root_builds/v6-14-00-patches/opt/include/TGlobal.h:48 #13 0x00007ffff7be9dcd in TObject::CheckedHash (this=0xee3bc0) at /home/pcanal/root_builds/v6-14-00-patches/opt/include/TObject.h:314 #14 THashTable::GetCheckedHashValue (this=0xe65a20, obj=0xee3bc0) at /home/pcanal/root_builds/v6-14-00-patches/opt/include/THashTable.h:94 #15 THashTable::Add (this=0xe65a20, obj=0xee3bc0) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/cont/src/THashTable.cxx:96 #16 0x00007ffff7be6bf1 in THashList::AddLast (this=this@entry=0x5be690, obj=obj@entry=0xee3bc0) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/cont/src/THashList.cxx:100 #17 0x00007ffff7c4e0d1 in TListOfDataMembers::AddLast (this=0x5be690, obj=0xee3bc0) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/meta/src/TListOfDataMembers.cxx:103 #18 0x00007ffff7ab8785 in TList::Add (obj=0xee3bc0, this=0x5be690) at /home/pcanal/root_builds/v6-14-00-patches/opt/include/TList.h:87 #19 TROOT::GetListOfGlobals (this=0x7ffff7da7a60 <ROOT::Internal::GetROOT1()::alloc>, load=load@entry=false) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/base/src/TROOT.cxx:1767 #20 0x00007fffeeab1058 in TCling::HandleNewDecl (this=0x4a0550, DV=0xedf238, isDeserialized=isDeserialized@entry=true, modifiedTClasses=...) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/metacling/src/TCling.cxx:555 #21 0x00007fffeeabb785 in TCling::UpdateListsOnCommitted (this=0x4a0550, T=...) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/metacling/src/TCling.cxx:6115 #22 0x00007fffeebd0103 in cling::MultiplexInterpreterCallbacks::TransactionCommitted (this=0x57fe20, T=...) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/interpreter/cling/lib/Interpreter/MultiplexInterpreterCallbacks.h:76 root-project#23 0x00007fffeed05d71 in cling::IncrementalParser::commitTransaction (this=0x4a2980, PRT=..., ClearDiagClient=true) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/interpreter/cling/lib/Interpreter/IncrementalParser.cpp:532 root-project#24 0x00007fffeed06399 in cling::IncrementalParser::Compile (this=0x4a2980, input=..., Opts=...) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/interpreter/cling/lib/Interpreter/IncrementalParser.cpp:663 root-project#25 0x00007fffeebcbc4e in cling::Interpreter::DeclareInternal (this=0x4a0f30, input=..., CO=..., T=0x7fffffffd680) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/interpreter/cling/lib/Interpreter/Interpreter.cpp:1195 root-project#26 0x00007fffeebca8e8 in cling::Interpreter::declare (this=0x4a0f30, input=..., T=0x7fffffffd680) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/interpreter/cling/lib/Interpreter/Interpreter.cpp:823 root-project#27 0x00007fffeebcb560 in cling::Interpreter::DeclareCFunction (this=0x4a0f30, name=..., code=..., withAccessControl=true) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/interpreter/cling/lib/Interpreter/Interpreter.cpp:1096 root-project#28 0x00007fffeebcb862 in cling::Interpreter::compileFunction (this=0x4a0f30, name=..., code=..., ifUnique=false, withAccessControl=true) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/interpreter/cling/lib/Interpreter/Interpreter.cpp:1140 root-project#29 0x00007fffeeafb83c in TClingCallFunc::compile_wrapper (withAccessControl=true, wrapper=..., wrapper_name=..., this=0xcf3c10) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/metacling/src/TClingCallFunc.cxx:270 root-project#30 TClingCallFunc::make_wrapper (this=this@entry=0xcf3c10) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/metacling/src/TClingCallFunc.cxx:1096 root-project#31 0x00007fffeeafbcb8 in TClingCallFunc::IFacePtr (this=this@entry=0xcf3c10) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/metacling/src/TClingCallFunc.cxx:2233 root-project#32 0x00007fffeeafbe83 in TClingCallFunc::ExecT<long> (address=0x0, this=0xcf3c10) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/metacling/src/TClingCallFunc.cxx:2045 root-project#33 TClingCallFunc::ExecInt (this=0xcf3c10, address=0x0) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/metacling/src/TClingCallFunc.cxx:2065 root-project#34 0x00007ffff7c56e8d in TMethodCall::Execute (this=0xd97710, object=<optimized out>, retLong=@0x7fffffffd958: 0) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/meta/src/TMethodCall.cxx:457 root-project#35 0x0000000000401009 in TMethodCall::Execute(long&) () root-project#36 0x00000000004010ea in long TPluginHandler::ExecPluginImpl<>() () root-project#37 0x000000000040106d in long TPluginHandler::ExecPlugin<>(int) () root-project#38 0x0000000000400e21 in mytest() () root-project#39 0x0000000000400e92 in main ()
pcanal
referenced
this pull request
in pcanal/root
Oct 9, 2018
…railing transactions. This fixes https://sft.its.cern.ch/jira/browse/ROOT-9672 With the current code, cling::Interpreter::compileFunction will get confused by transaction created during the callbacks executed during the cling::IncrementalParser::commitTransaction of the main transaction. The work-around is to avoid the need for the transaction by marking the class TGlobal has been guaranteed to have a proper Hash vs RecursiveRemove setup thus avoid the need to check it at run-time (by JIT code) Reproducer: With a main composed of 'only': int main(int argc, char ** argv) { char const * class_string = (argc == 2) ? argv[1] : "std::vector<int>"; auto const result [[gnu::unused]] = TClass::GetClass(class_string); return 0; } which is a representation of real use case (in a more complex setup) in ART. We were getting: Error in <TClingCallFunc::make_wrapper>: Failed to compile ==== SOURCE BEGIN ==== #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wformat-security" __attribute__((used)) extern "C" void __cf_0(void* obj, int nargs, void** args, void* ret) { if (ret) { (*(TStreamerInfo**)ret) = new TStreamerInfo(); return; } else { new TStreamerInfo(); return; } } #pragma clang diagnostic pop ==== SOURCE END ==== Error in <TClingCallFunc::ExecT>: Called with no wrapper, not implemented! Error in <TVirtualStreamerInfo::Factory>: The plugin handler for TVirtualStreamerInfo was found but failed to create the factory object! The reason is that during TClingCallFunc::make_wrapper, the call to cling::Interpreter::compileFunction ends with: if (const llvm::GlobalValue* GV = getLastTransaction()->getModule()->getNamedValue(name)) However in the 'broken' case, the getLastTransaction does not return the transaction for the code being compiled by DeclareCFunction but instead the one used/created at: #0 cling::IncrementalParser::endTransaction (this=0x4a2980, T=0x8c0fb0) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/interpreter/cling/lib/Interpreter/IncrementalParser.cpp:345 #1 0x00007fffeebc7899 in cling::Interpreter::PushTransactionRAII::pop (this=0x7fffffffcb00) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/interpreter/cling/lib/Interpreter/Interpreter.cpp:111 #2 0x00007fffeebc785e in cling::Interpreter::PushTransactionRAII::~PushTransactionRAII (this=0x7fffffffcb00, __in_chrg=<optimized out>) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/interpreter/cling/lib/Interpreter/Interpreter.cpp:106 #3 0x00007fffeebeb659 in cling::LookupHelper::findScope (this=0x4a9dd0, className=..., diagOnOff=cling::LookupHelper::NoDiagnostics, resultType=0x7fffffffcd08, instantiateTemplate=false) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/interpreter/cling/lib/Interpreter/LookupHelper.cpp:466 #4 0x00007fffeeabe0df in TCling::CheckClassInfo (this=0x4a0550, name=<optimized out>, autoload=<optimized out>, isClassOrNamespaceOnly=<optimized out>) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/metacling/src/TCling.cxx:3630 #5 0x00007ffff7c3040d in TClass::Init (this=this@entry=0xdafd20, name=name@entry=0x7ffff7cb7638 "TGlobal", cversion=cversion@entry=2, typeinfo=typeinfo@entry=0x7ffff7d8b6d8 <typeinfo for TGlobal>, isa=isa@entry=0x477430, dfil=dfil@entry=0x7ffff7cb8cab "TGlobal.h", ifil=<optimized out>, dl=<optimized out>, il=<optimized out>, givenInfo=<optimized out>, silent=<optimized out>) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/meta/src/TClass.cxx:1431 #6 0x00007ffff7c3a1b8 in TClass::TClass (this=0xdafd20, name=0x7ffff7cb7638 "TGlobal", cversion=<optimized out>, info=..., isa=0x477430, dfil=0x7ffff7cb8cab "TGlobal.h", ifil=0x7ffff7cccf88 "/local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/meta/src/TGlobal.cxx", dl=27, il=25, silent=false) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/meta/src/TClass.cxx:1273 #7 0x00007ffff7c3a72a in ROOT::CreateClass (cname=0x7ffff7cb7638 "TGlobal", id=id@entry=2, info=..., isa=isa@entry=0x477430, dfil=dfil@entry=0x7ffff7cb8cab "TGlobal.h", ifil=ifil@entry=0x7ffff7cccf88 "/local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/meta/src/TGlobal.cxx", dl=27, il=25) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/meta/src/TClass.cxx:5607 #8 0x00007ffff7c4b552 in ROOT::Internal::TDefaultInitBehavior::CreateClass (il=25, dl=27, ifil=0x7ffff7cccf88 "/local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/meta/src/TGlobal.cxx", dfil=0x7ffff7cb8cab "TGlobal.h", isa=0x477430, info=..., id=2, cname=<optimized out>, this=0x7ffff7da7508 <ROOT::Internal::DefineBehavior(void*, void*)::theDefault>) at /home/pcanal/root_builds/v6-14-00-patches/opt/include/Rtypes.h:176 #9 ROOT::TGenericClassInfo::GetClass (this=0x7ffff7dab660 <ROOT::GenerateInitInstanceLocal(TGlobal const*)::instance>) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/meta/src/TGenericClassInfo.cxx:250 #10 0x00007ffff7b1a2d8 in TGlobal::Class () at /home/pcanal/root_builds/v6-14-00-patches/opt/core/base/G__Core.cxx:17156 #11 0x00007ffff7ac01de in TGlobal::IsA (this=0xee3bc0) at /home/pcanal/root_builds/v6-14-00-patches/opt/include/TGlobal.h:48 #12 TGlobal::CheckTObjectHashConsistency (this=0xee3bc0) at /home/pcanal/root_builds/v6-14-00-patches/opt/include/TGlobal.h:48 #13 0x00007ffff7be9dcd in TObject::CheckedHash (this=0xee3bc0) at /home/pcanal/root_builds/v6-14-00-patches/opt/include/TObject.h:314 #14 THashTable::GetCheckedHashValue (this=0xe65a20, obj=0xee3bc0) at /home/pcanal/root_builds/v6-14-00-patches/opt/include/THashTable.h:94 #15 THashTable::Add (this=0xe65a20, obj=0xee3bc0) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/cont/src/THashTable.cxx:96 #16 0x00007ffff7be6bf1 in THashList::AddLast (this=this@entry=0x5be690, obj=obj@entry=0xee3bc0) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/cont/src/THashList.cxx:100 #17 0x00007ffff7c4e0d1 in TListOfDataMembers::AddLast (this=0x5be690, obj=0xee3bc0) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/meta/src/TListOfDataMembers.cxx:103 #18 0x00007ffff7ab8785 in TList::Add (obj=0xee3bc0, this=0x5be690) at /home/pcanal/root_builds/v6-14-00-patches/opt/include/TList.h:87 #19 TROOT::GetListOfGlobals (this=0x7ffff7da7a60 <ROOT::Internal::GetROOT1()::alloc>, load=load@entry=false) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/base/src/TROOT.cxx:1767 #20 0x00007fffeeab1058 in TCling::HandleNewDecl (this=0x4a0550, DV=0xedf238, isDeserialized=isDeserialized@entry=true, modifiedTClasses=...) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/metacling/src/TCling.cxx:555 #21 0x00007fffeeabb785 in TCling::UpdateListsOnCommitted (this=0x4a0550, T=...) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/metacling/src/TCling.cxx:6115 #22 0x00007fffeebd0103 in cling::MultiplexInterpreterCallbacks::TransactionCommitted (this=0x57fe20, T=...) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/interpreter/cling/lib/Interpreter/MultiplexInterpreterCallbacks.h:76 root-project#23 0x00007fffeed05d71 in cling::IncrementalParser::commitTransaction (this=0x4a2980, PRT=..., ClearDiagClient=true) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/interpreter/cling/lib/Interpreter/IncrementalParser.cpp:532 root-project#24 0x00007fffeed06399 in cling::IncrementalParser::Compile (this=0x4a2980, input=..., Opts=...) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/interpreter/cling/lib/Interpreter/IncrementalParser.cpp:663 root-project#25 0x00007fffeebcbc4e in cling::Interpreter::DeclareInternal (this=0x4a0f30, input=..., CO=..., T=0x7fffffffd680) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/interpreter/cling/lib/Interpreter/Interpreter.cpp:1195 root-project#26 0x00007fffeebca8e8 in cling::Interpreter::declare (this=0x4a0f30, input=..., T=0x7fffffffd680) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/interpreter/cling/lib/Interpreter/Interpreter.cpp:823 root-project#27 0x00007fffeebcb560 in cling::Interpreter::DeclareCFunction (this=0x4a0f30, name=..., code=..., withAccessControl=true) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/interpreter/cling/lib/Interpreter/Interpreter.cpp:1096 root-project#28 0x00007fffeebcb862 in cling::Interpreter::compileFunction (this=0x4a0f30, name=..., code=..., ifUnique=false, withAccessControl=true) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/interpreter/cling/lib/Interpreter/Interpreter.cpp:1140 root-project#29 0x00007fffeeafb83c in TClingCallFunc::compile_wrapper (withAccessControl=true, wrapper=..., wrapper_name=..., this=0xcf3c10) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/metacling/src/TClingCallFunc.cxx:270 root-project#30 TClingCallFunc::make_wrapper (this=this@entry=0xcf3c10) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/metacling/src/TClingCallFunc.cxx:1096 root-project#31 0x00007fffeeafbcb8 in TClingCallFunc::IFacePtr (this=this@entry=0xcf3c10) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/metacling/src/TClingCallFunc.cxx:2233 root-project#32 0x00007fffeeafbe83 in TClingCallFunc::ExecT<long> (address=0x0, this=0xcf3c10) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/metacling/src/TClingCallFunc.cxx:2045 root-project#33 TClingCallFunc::ExecInt (this=0xcf3c10, address=0x0) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/metacling/src/TClingCallFunc.cxx:2065 root-project#34 0x00007ffff7c56e8d in TMethodCall::Execute (this=0xd97710, object=<optimized out>, retLong=@0x7fffffffd958: 0) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/meta/src/TMethodCall.cxx:457 root-project#35 0x0000000000401009 in TMethodCall::Execute(long&) () root-project#36 0x00000000004010ea in long TPluginHandler::ExecPluginImpl<>() () root-project#37 0x000000000040106d in long TPluginHandler::ExecPlugin<>(int) () root-project#38 0x0000000000400e21 in mytest() () root-project#39 0x0000000000400e92 in main ()
pcanal
referenced
this pull request
in pcanal/root
Oct 9, 2018
…railing transactions. This fixes https://sft.its.cern.ch/jira/browse/ROOT-9672 With the current code, cling::Interpreter::compileFunction will get confused by transaction created during the callbacks executed during the cling::IncrementalParser::commitTransaction of the main transaction. The work-around is to avoid the need for the transaction by marking the class TGlobal has been guaranteed to have a proper Hash vs RecursiveRemove setup thus avoid the need to check it at run-time (by JIT code) Reproducer: With a main composed of 'only': int main(int argc, char ** argv) { char const * class_string = (argc == 2) ? argv[1] : "std::vector<int>"; auto const result [[gnu::unused]] = TClass::GetClass(class_string); return 0; } which is a representation of real use case (in a more complex setup) in ART. We were getting: Error in <TClingCallFunc::make_wrapper>: Failed to compile ==== SOURCE BEGIN ==== #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wformat-security" __attribute__((used)) extern "C" void __cf_0(void* obj, int nargs, void** args, void* ret) { if (ret) { (*(TStreamerInfo**)ret) = new TStreamerInfo(); return; } else { new TStreamerInfo(); return; } } #pragma clang diagnostic pop ==== SOURCE END ==== Error in <TClingCallFunc::ExecT>: Called with no wrapper, not implemented! Error in <TVirtualStreamerInfo::Factory>: The plugin handler for TVirtualStreamerInfo was found but failed to create the factory object! The reason is that during TClingCallFunc::make_wrapper, the call to cling::Interpreter::compileFunction ends with: if (const llvm::GlobalValue* GV = getLastTransaction()->getModule()->getNamedValue(name)) However in the 'broken' case, the getLastTransaction does not return the transaction for the code being compiled by DeclareCFunction but instead the one used/created at: #0 cling::IncrementalParser::endTransaction (this=0x4a2980, T=0x8c0fb0) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/interpreter/cling/lib/Interpreter/IncrementalParser.cpp:345 #1 0x00007fffeebc7899 in cling::Interpreter::PushTransactionRAII::pop (this=0x7fffffffcb00) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/interpreter/cling/lib/Interpreter/Interpreter.cpp:111 #2 0x00007fffeebc785e in cling::Interpreter::PushTransactionRAII::~PushTransactionRAII (this=0x7fffffffcb00, __in_chrg=<optimized out>) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/interpreter/cling/lib/Interpreter/Interpreter.cpp:106 #3 0x00007fffeebeb659 in cling::LookupHelper::findScope (this=0x4a9dd0, className=..., diagOnOff=cling::LookupHelper::NoDiagnostics, resultType=0x7fffffffcd08, instantiateTemplate=false) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/interpreter/cling/lib/Interpreter/LookupHelper.cpp:466 #4 0x00007fffeeabe0df in TCling::CheckClassInfo (this=0x4a0550, name=<optimized out>, autoload=<optimized out>, isClassOrNamespaceOnly=<optimized out>) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/metacling/src/TCling.cxx:3630 #5 0x00007ffff7c3040d in TClass::Init (this=this@entry=0xdafd20, name=name@entry=0x7ffff7cb7638 "TGlobal", cversion=cversion@entry=2, typeinfo=typeinfo@entry=0x7ffff7d8b6d8 <typeinfo for TGlobal>, isa=isa@entry=0x477430, dfil=dfil@entry=0x7ffff7cb8cab "TGlobal.h", ifil=<optimized out>, dl=<optimized out>, il=<optimized out>, givenInfo=<optimized out>, silent=<optimized out>) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/meta/src/TClass.cxx:1431 #6 0x00007ffff7c3a1b8 in TClass::TClass (this=0xdafd20, name=0x7ffff7cb7638 "TGlobal", cversion=<optimized out>, info=..., isa=0x477430, dfil=0x7ffff7cb8cab "TGlobal.h", ifil=0x7ffff7cccf88 "/local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/meta/src/TGlobal.cxx", dl=27, il=25, silent=false) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/meta/src/TClass.cxx:1273 #7 0x00007ffff7c3a72a in ROOT::CreateClass (cname=0x7ffff7cb7638 "TGlobal", id=id@entry=2, info=..., isa=isa@entry=0x477430, dfil=dfil@entry=0x7ffff7cb8cab "TGlobal.h", ifil=ifil@entry=0x7ffff7cccf88 "/local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/meta/src/TGlobal.cxx", dl=27, il=25) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/meta/src/TClass.cxx:5607 #8 0x00007ffff7c4b552 in ROOT::Internal::TDefaultInitBehavior::CreateClass (il=25, dl=27, ifil=0x7ffff7cccf88 "/local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/meta/src/TGlobal.cxx", dfil=0x7ffff7cb8cab "TGlobal.h", isa=0x477430, info=..., id=2, cname=<optimized out>, this=0x7ffff7da7508 <ROOT::Internal::DefineBehavior(void*, void*)::theDefault>) at /home/pcanal/root_builds/v6-14-00-patches/opt/include/Rtypes.h:176 #9 ROOT::TGenericClassInfo::GetClass (this=0x7ffff7dab660 <ROOT::GenerateInitInstanceLocal(TGlobal const*)::instance>) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/meta/src/TGenericClassInfo.cxx:250 #10 0x00007ffff7b1a2d8 in TGlobal::Class () at /home/pcanal/root_builds/v6-14-00-patches/opt/core/base/G__Core.cxx:17156 #11 0x00007ffff7ac01de in TGlobal::IsA (this=0xee3bc0) at /home/pcanal/root_builds/v6-14-00-patches/opt/include/TGlobal.h:48 #12 TGlobal::CheckTObjectHashConsistency (this=0xee3bc0) at /home/pcanal/root_builds/v6-14-00-patches/opt/include/TGlobal.h:48 #13 0x00007ffff7be9dcd in TObject::CheckedHash (this=0xee3bc0) at /home/pcanal/root_builds/v6-14-00-patches/opt/include/TObject.h:314 #14 THashTable::GetCheckedHashValue (this=0xe65a20, obj=0xee3bc0) at /home/pcanal/root_builds/v6-14-00-patches/opt/include/THashTable.h:94 #15 THashTable::Add (this=0xe65a20, obj=0xee3bc0) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/cont/src/THashTable.cxx:96 #16 0x00007ffff7be6bf1 in THashList::AddLast (this=this@entry=0x5be690, obj=obj@entry=0xee3bc0) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/cont/src/THashList.cxx:100 #17 0x00007ffff7c4e0d1 in TListOfDataMembers::AddLast (this=0x5be690, obj=0xee3bc0) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/meta/src/TListOfDataMembers.cxx:103 #18 0x00007ffff7ab8785 in TList::Add (obj=0xee3bc0, this=0x5be690) at /home/pcanal/root_builds/v6-14-00-patches/opt/include/TList.h:87 #19 TROOT::GetListOfGlobals (this=0x7ffff7da7a60 <ROOT::Internal::GetROOT1()::alloc>, load=load@entry=false) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/base/src/TROOT.cxx:1767 #20 0x00007fffeeab1058 in TCling::HandleNewDecl (this=0x4a0550, DV=0xedf238, isDeserialized=isDeserialized@entry=true, modifiedTClasses=...) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/metacling/src/TCling.cxx:555 #21 0x00007fffeeabb785 in TCling::UpdateListsOnCommitted (this=0x4a0550, T=...) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/metacling/src/TCling.cxx:6115 #22 0x00007fffeebd0103 in cling::MultiplexInterpreterCallbacks::TransactionCommitted (this=0x57fe20, T=...) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/interpreter/cling/lib/Interpreter/MultiplexInterpreterCallbacks.h:76 root-project#23 0x00007fffeed05d71 in cling::IncrementalParser::commitTransaction (this=0x4a2980, PRT=..., ClearDiagClient=true) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/interpreter/cling/lib/Interpreter/IncrementalParser.cpp:532 root-project#24 0x00007fffeed06399 in cling::IncrementalParser::Compile (this=0x4a2980, input=..., Opts=...) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/interpreter/cling/lib/Interpreter/IncrementalParser.cpp:663 root-project#25 0x00007fffeebcbc4e in cling::Interpreter::DeclareInternal (this=0x4a0f30, input=..., CO=..., T=0x7fffffffd680) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/interpreter/cling/lib/Interpreter/Interpreter.cpp:1195 root-project#26 0x00007fffeebca8e8 in cling::Interpreter::declare (this=0x4a0f30, input=..., T=0x7fffffffd680) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/interpreter/cling/lib/Interpreter/Interpreter.cpp:823 root-project#27 0x00007fffeebcb560 in cling::Interpreter::DeclareCFunction (this=0x4a0f30, name=..., code=..., withAccessControl=true) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/interpreter/cling/lib/Interpreter/Interpreter.cpp:1096 root-project#28 0x00007fffeebcb862 in cling::Interpreter::compileFunction (this=0x4a0f30, name=..., code=..., ifUnique=false, withAccessControl=true) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/interpreter/cling/lib/Interpreter/Interpreter.cpp:1140 root-project#29 0x00007fffeeafb83c in TClingCallFunc::compile_wrapper (withAccessControl=true, wrapper=..., wrapper_name=..., this=0xcf3c10) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/metacling/src/TClingCallFunc.cxx:270 root-project#30 TClingCallFunc::make_wrapper (this=this@entry=0xcf3c10) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/metacling/src/TClingCallFunc.cxx:1096 root-project#31 0x00007fffeeafbcb8 in TClingCallFunc::IFacePtr (this=this@entry=0xcf3c10) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/metacling/src/TClingCallFunc.cxx:2233 root-project#32 0x00007fffeeafbe83 in TClingCallFunc::ExecT<long> (address=0x0, this=0xcf3c10) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/metacling/src/TClingCallFunc.cxx:2045 root-project#33 TClingCallFunc::ExecInt (this=0xcf3c10, address=0x0) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/metacling/src/TClingCallFunc.cxx:2065 root-project#34 0x00007ffff7c56e8d in TMethodCall::Execute (this=0xd97710, object=<optimized out>, retLong=@0x7fffffffd958: 0) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/meta/src/TMethodCall.cxx:457 root-project#35 0x0000000000401009 in TMethodCall::Execute(long&) () root-project#36 0x00000000004010ea in long TPluginHandler::ExecPluginImpl<>() () root-project#37 0x000000000040106d in long TPluginHandler::ExecPlugin<>(int) () root-project#38 0x0000000000400e21 in mytest() () root-project#39 0x0000000000400e92 in main ()
pcanal
referenced
this pull request
in pcanal/root
Oct 10, 2018
…transactions. This fixes https://sft.its.cern.ch/jira/browse/ROOT-9672 by having cling::Interpreter::DeclareCFunction return the transaction containing the compiled code. With the previous code, cling::Interpreter::compileFunction will get confused by transaction created during the callbacks executed during the cling::IncrementalParser::commitTransaction of the main transaction. Reproducer: With a main composed of 'only': int main(int argc, char ** argv) { char const * class_string = (argc == 2) ? argv[1] : "std::vector<int>"; auto const result [[gnu::unused]] = TClass::GetClass(class_string); return 0; } which is a representation of real use case (in a more complex setup) in ART. We were getting: Error in <TClingCallFunc::make_wrapper>: Failed to compile ==== SOURCE BEGIN ==== #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wformat-security" __attribute__((used)) extern "C" void __cf_0(void* obj, int nargs, void** args, void* ret) { if (ret) { (*(TStreamerInfo**)ret) = new TStreamerInfo(); return; } else { new TStreamerInfo(); return; } } #pragma clang diagnostic pop ==== SOURCE END ==== Error in <TClingCallFunc::ExecT>: Called with no wrapper, not implemented! Error in <TVirtualStreamerInfo::Factory>: The plugin handler for TVirtualStreamerInfo was found but failed to create the factory object! The reason is that during TClingCallFunc::make_wrapper, the call to cling::Interpreter::compileFunction ends with: if (const llvm::GlobalValue* GV = getLastTransaction()->getModule()->getNamedValue(name)) However in the 'broken' case, the getLastTransaction does not return the transaction for the code being compiled by DeclareCFunction but instead the one used/created at: #0 cling::IncrementalParser::endTransaction (this=0x4a2980, T=0x8c0fb0) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/interpreter/cling/lib/Interpreter/IncrementalParser.cpp:345 #1 0x00007fffeebc7899 in cling::Interpreter::PushTransactionRAII::pop (this=0x7fffffffcb00) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/interpreter/cling/lib/Interpreter/Interpreter.cpp:111 #2 0x00007fffeebc785e in cling::Interpreter::PushTransactionRAII::~PushTransactionRAII (this=0x7fffffffcb00, __in_chrg=<optimized out>) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/interpreter/cling/lib/Interpreter/Interpreter.cpp:106 #3 0x00007fffeebeb659 in cling::LookupHelper::findScope (this=0x4a9dd0, className=..., diagOnOff=cling::LookupHelper::NoDiagnostics, resultType=0x7fffffffcd08, instantiateTemplate=false) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/interpreter/cling/lib/Interpreter/LookupHelper.cpp:466 #4 0x00007fffeeabe0df in TCling::CheckClassInfo (this=0x4a0550, name=<optimized out>, autoload=<optimized out>, isClassOrNamespaceOnly=<optimized out>) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/metacling/src/TCling.cxx:3630 #5 0x00007ffff7c3040d in TClass::Init (this=this@entry=0xdafd20, name=name@entry=0x7ffff7cb7638 "TGlobal", cversion=cversion@entry=2, typeinfo=typeinfo@entry=0x7ffff7d8b6d8 <typeinfo for TGlobal>, isa=isa@entry=0x477430, dfil=dfil@entry=0x7ffff7cb8cab "TGlobal.h", ifil=<optimized out>, dl=<optimized out>, il=<optimized out>, givenInfo=<optimized out>, silent=<optimized out>) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/meta/src/TClass.cxx:1431 #6 0x00007ffff7c3a1b8 in TClass::TClass (this=0xdafd20, name=0x7ffff7cb7638 "TGlobal", cversion=<optimized out>, info=..., isa=0x477430, dfil=0x7ffff7cb8cab "TGlobal.h", ifil=0x7ffff7cccf88 "/local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/meta/src/TGlobal.cxx", dl=27, il=25, silent=false) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/meta/src/TClass.cxx:1273 #7 0x00007ffff7c3a72a in ROOT::CreateClass (cname=0x7ffff7cb7638 "TGlobal", id=id@entry=2, info=..., isa=isa@entry=0x477430, dfil=dfil@entry=0x7ffff7cb8cab "TGlobal.h", ifil=ifil@entry=0x7ffff7cccf88 "/local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/meta/src/TGlobal.cxx", dl=27, il=25) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/meta/src/TClass.cxx:5607 #8 0x00007ffff7c4b552 in ROOT::Internal::TDefaultInitBehavior::CreateClass (il=25, dl=27, ifil=0x7ffff7cccf88 "/local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/meta/src/TGlobal.cxx", dfil=0x7ffff7cb8cab "TGlobal.h", isa=0x477430, info=..., id=2, cname=<optimized out>, this=0x7ffff7da7508 <ROOT::Internal::DefineBehavior(void*, void*)::theDefault>) at /home/pcanal/root_builds/v6-14-00-patches/opt/include/Rtypes.h:176 #9 ROOT::TGenericClassInfo::GetClass (this=0x7ffff7dab660 <ROOT::GenerateInitInstanceLocal(TGlobal const*)::instance>) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/meta/src/TGenericClassInfo.cxx:250 #10 0x00007ffff7b1a2d8 in TGlobal::Class () at /home/pcanal/root_builds/v6-14-00-patches/opt/core/base/G__Core.cxx:17156 #11 0x00007ffff7ac01de in TGlobal::IsA (this=0xee3bc0) at /home/pcanal/root_builds/v6-14-00-patches/opt/include/TGlobal.h:48 #12 TGlobal::CheckTObjectHashConsistency (this=0xee3bc0) at /home/pcanal/root_builds/v6-14-00-patches/opt/include/TGlobal.h:48 #13 0x00007ffff7be9dcd in TObject::CheckedHash (this=0xee3bc0) at /home/pcanal/root_builds/v6-14-00-patches/opt/include/TObject.h:314 #14 THashTable::GetCheckedHashValue (this=0xe65a20, obj=0xee3bc0) at /home/pcanal/root_builds/v6-14-00-patches/opt/include/THashTable.h:94 #15 THashTable::Add (this=0xe65a20, obj=0xee3bc0) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/cont/src/THashTable.cxx:96 #16 0x00007ffff7be6bf1 in THashList::AddLast (this=this@entry=0x5be690, obj=obj@entry=0xee3bc0) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/cont/src/THashList.cxx:100 #17 0x00007ffff7c4e0d1 in TListOfDataMembers::AddLast (this=0x5be690, obj=0xee3bc0) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/meta/src/TListOfDataMembers.cxx:103 #18 0x00007ffff7ab8785 in TList::Add (obj=0xee3bc0, this=0x5be690) at /home/pcanal/root_builds/v6-14-00-patches/opt/include/TList.h:87 #19 TROOT::GetListOfGlobals (this=0x7ffff7da7a60 <ROOT::Internal::GetROOT1()::alloc>, load=load@entry=false) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/base/src/TROOT.cxx:1767 #20 0x00007fffeeab1058 in TCling::HandleNewDecl (this=0x4a0550, DV=0xedf238, isDeserialized=isDeserialized@entry=true, modifiedTClasses=...) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/metacling/src/TCling.cxx:555 #21 0x00007fffeeabb785 in TCling::UpdateListsOnCommitted (this=0x4a0550, T=...) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/metacling/src/TCling.cxx:6115 #22 0x00007fffeebd0103 in cling::MultiplexInterpreterCallbacks::TransactionCommitted (this=0x57fe20, T=...) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/interpreter/cling/lib/Interpreter/MultiplexInterpreterCallbacks.h:76 root-project#23 0x00007fffeed05d71 in cling::IncrementalParser::commitTransaction (this=0x4a2980, PRT=..., ClearDiagClient=true) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/interpreter/cling/lib/Interpreter/IncrementalParser.cpp:532 root-project#24 0x00007fffeed06399 in cling::IncrementalParser::Compile (this=0x4a2980, input=..., Opts=...) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/interpreter/cling/lib/Interpreter/IncrementalParser.cpp:663 root-project#25 0x00007fffeebcbc4e in cling::Interpreter::DeclareInternal (this=0x4a0f30, input=..., CO=..., T=0x7fffffffd680) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/interpreter/cling/lib/Interpreter/Interpreter.cpp:1195 root-project#26 0x00007fffeebca8e8 in cling::Interpreter::declare (this=0x4a0f30, input=..., T=0x7fffffffd680) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/interpreter/cling/lib/Interpreter/Interpreter.cpp:823 root-project#27 0x00007fffeebcb560 in cling::Interpreter::DeclareCFunction (this=0x4a0f30, name=..., code=..., withAccessControl=true) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/interpreter/cling/lib/Interpreter/Interpreter.cpp:1096 root-project#28 0x00007fffeebcb862 in cling::Interpreter::compileFunction (this=0x4a0f30, name=..., code=..., ifUnique=false, withAccessControl=true) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/interpreter/cling/lib/Interpreter/Interpreter.cpp:1140 root-project#29 0x00007fffeeafb83c in TClingCallFunc::compile_wrapper (withAccessControl=true, wrapper=..., wrapper_name=..., this=0xcf3c10) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/metacling/src/TClingCallFunc.cxx:270 root-project#30 TClingCallFunc::make_wrapper (this=this@entry=0xcf3c10) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/metacling/src/TClingCallFunc.cxx:1096 root-project#31 0x00007fffeeafbcb8 in TClingCallFunc::IFacePtr (this=this@entry=0xcf3c10) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/metacling/src/TClingCallFunc.cxx:2233 root-project#32 0x00007fffeeafbe83 in TClingCallFunc::ExecT<long> (address=0x0, this=0xcf3c10) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/metacling/src/TClingCallFunc.cxx:2045 root-project#33 TClingCallFunc::ExecInt (this=0xcf3c10, address=0x0) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/metacling/src/TClingCallFunc.cxx:2065 root-project#34 0x00007ffff7c56e8d in TMethodCall::Execute (this=0xd97710, object=<optimized out>, retLong=@0x7fffffffd958: 0) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/meta/src/TMethodCall.cxx:457 root-project#35 0x0000000000401009 in TMethodCall::Execute(long&) () root-project#36 0x00000000004010ea in long TPluginHandler::ExecPluginImpl<>() () root-project#37 0x000000000040106d in long TPluginHandler::ExecPlugin<>(int) () root-project#38 0x0000000000400e21 in mytest() () root-project#39 0x0000000000400e92 in main ()
pcanal
referenced
this pull request
in pcanal/root
Oct 10, 2018
…transactions. This fixes https://sft.its.cern.ch/jira/browse/ROOT-9672 by having cling::Interpreter::DeclareCFunction return the transaction containing the compiled code. With the previous code, cling::Interpreter::compileFunction will get confused by transaction created during the callbacks executed during the cling::IncrementalParser::commitTransaction of the main transaction. Reproducer: With a main composed of 'only': int main(int argc, char ** argv) { char const * class_string = (argc == 2) ? argv[1] : "std::vector<int>"; auto const result [[gnu::unused]] = TClass::GetClass(class_string); return 0; } which is a representation of real use case (in a more complex setup) in ART. We were getting: Error in <TClingCallFunc::make_wrapper>: Failed to compile ==== SOURCE BEGIN ==== #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wformat-security" __attribute__((used)) extern "C" void __cf_0(void* obj, int nargs, void** args, void* ret) { if (ret) { (*(TStreamerInfo**)ret) = new TStreamerInfo(); return; } else { new TStreamerInfo(); return; } } #pragma clang diagnostic pop ==== SOURCE END ==== Error in <TClingCallFunc::ExecT>: Called with no wrapper, not implemented! Error in <TVirtualStreamerInfo::Factory>: The plugin handler for TVirtualStreamerInfo was found but failed to create the factory object! The reason is that during TClingCallFunc::make_wrapper, the call to cling::Interpreter::compileFunction ends with: if (const llvm::GlobalValue* GV = getLastTransaction()->getModule()->getNamedValue(name)) However in the 'broken' case, the getLastTransaction does not return the transaction for the code being compiled by DeclareCFunction but instead the one used/created at: #0 cling::IncrementalParser::endTransaction (this=0x4a2980, T=0x8c0fb0) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/interpreter/cling/lib/Interpreter/IncrementalParser.cpp:345 #1 0x00007fffeebc7899 in cling::Interpreter::PushTransactionRAII::pop (this=0x7fffffffcb00) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/interpreter/cling/lib/Interpreter/Interpreter.cpp:111 #2 0x00007fffeebc785e in cling::Interpreter::PushTransactionRAII::~PushTransactionRAII (this=0x7fffffffcb00, __in_chrg=<optimized out>) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/interpreter/cling/lib/Interpreter/Interpreter.cpp:106 #3 0x00007fffeebeb659 in cling::LookupHelper::findScope (this=0x4a9dd0, className=..., diagOnOff=cling::LookupHelper::NoDiagnostics, resultType=0x7fffffffcd08, instantiateTemplate=false) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/interpreter/cling/lib/Interpreter/LookupHelper.cpp:466 #4 0x00007fffeeabe0df in TCling::CheckClassInfo (this=0x4a0550, name=<optimized out>, autoload=<optimized out>, isClassOrNamespaceOnly=<optimized out>) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/metacling/src/TCling.cxx:3630 #5 0x00007ffff7c3040d in TClass::Init (this=this@entry=0xdafd20, name=name@entry=0x7ffff7cb7638 "TGlobal", cversion=cversion@entry=2, typeinfo=typeinfo@entry=0x7ffff7d8b6d8 <typeinfo for TGlobal>, isa=isa@entry=0x477430, dfil=dfil@entry=0x7ffff7cb8cab "TGlobal.h", ifil=<optimized out>, dl=<optimized out>, il=<optimized out>, givenInfo=<optimized out>, silent=<optimized out>) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/meta/src/TClass.cxx:1431 #6 0x00007ffff7c3a1b8 in TClass::TClass (this=0xdafd20, name=0x7ffff7cb7638 "TGlobal", cversion=<optimized out>, info=..., isa=0x477430, dfil=0x7ffff7cb8cab "TGlobal.h", ifil=0x7ffff7cccf88 "/local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/meta/src/TGlobal.cxx", dl=27, il=25, silent=false) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/meta/src/TClass.cxx:1273 #7 0x00007ffff7c3a72a in ROOT::CreateClass (cname=0x7ffff7cb7638 "TGlobal", id=id@entry=2, info=..., isa=isa@entry=0x477430, dfil=dfil@entry=0x7ffff7cb8cab "TGlobal.h", ifil=ifil@entry=0x7ffff7cccf88 "/local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/meta/src/TGlobal.cxx", dl=27, il=25) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/meta/src/TClass.cxx:5607 #8 0x00007ffff7c4b552 in ROOT::Internal::TDefaultInitBehavior::CreateClass (il=25, dl=27, ifil=0x7ffff7cccf88 "/local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/meta/src/TGlobal.cxx", dfil=0x7ffff7cb8cab "TGlobal.h", isa=0x477430, info=..., id=2, cname=<optimized out>, this=0x7ffff7da7508 <ROOT::Internal::DefineBehavior(void*, void*)::theDefault>) at /home/pcanal/root_builds/v6-14-00-patches/opt/include/Rtypes.h:176 #9 ROOT::TGenericClassInfo::GetClass (this=0x7ffff7dab660 <ROOT::GenerateInitInstanceLocal(TGlobal const*)::instance>) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/meta/src/TGenericClassInfo.cxx:250 #10 0x00007ffff7b1a2d8 in TGlobal::Class () at /home/pcanal/root_builds/v6-14-00-patches/opt/core/base/G__Core.cxx:17156 #11 0x00007ffff7ac01de in TGlobal::IsA (this=0xee3bc0) at /home/pcanal/root_builds/v6-14-00-patches/opt/include/TGlobal.h:48 #12 TGlobal::CheckTObjectHashConsistency (this=0xee3bc0) at /home/pcanal/root_builds/v6-14-00-patches/opt/include/TGlobal.h:48 #13 0x00007ffff7be9dcd in TObject::CheckedHash (this=0xee3bc0) at /home/pcanal/root_builds/v6-14-00-patches/opt/include/TObject.h:314 #14 THashTable::GetCheckedHashValue (this=0xe65a20, obj=0xee3bc0) at /home/pcanal/root_builds/v6-14-00-patches/opt/include/THashTable.h:94 #15 THashTable::Add (this=0xe65a20, obj=0xee3bc0) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/cont/src/THashTable.cxx:96 #16 0x00007ffff7be6bf1 in THashList::AddLast (this=this@entry=0x5be690, obj=obj@entry=0xee3bc0) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/cont/src/THashList.cxx:100 #17 0x00007ffff7c4e0d1 in TListOfDataMembers::AddLast (this=0x5be690, obj=0xee3bc0) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/meta/src/TListOfDataMembers.cxx:103 #18 0x00007ffff7ab8785 in TList::Add (obj=0xee3bc0, this=0x5be690) at /home/pcanal/root_builds/v6-14-00-patches/opt/include/TList.h:87 #19 TROOT::GetListOfGlobals (this=0x7ffff7da7a60 <ROOT::Internal::GetROOT1()::alloc>, load=load@entry=false) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/base/src/TROOT.cxx:1767 #20 0x00007fffeeab1058 in TCling::HandleNewDecl (this=0x4a0550, DV=0xedf238, isDeserialized=isDeserialized@entry=true, modifiedTClasses=...) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/metacling/src/TCling.cxx:555 #21 0x00007fffeeabb785 in TCling::UpdateListsOnCommitted (this=0x4a0550, T=...) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/metacling/src/TCling.cxx:6115 #22 0x00007fffeebd0103 in cling::MultiplexInterpreterCallbacks::TransactionCommitted (this=0x57fe20, T=...) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/interpreter/cling/lib/Interpreter/MultiplexInterpreterCallbacks.h:76 root-project#23 0x00007fffeed05d71 in cling::IncrementalParser::commitTransaction (this=0x4a2980, PRT=..., ClearDiagClient=true) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/interpreter/cling/lib/Interpreter/IncrementalParser.cpp:532 root-project#24 0x00007fffeed06399 in cling::IncrementalParser::Compile (this=0x4a2980, input=..., Opts=...) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/interpreter/cling/lib/Interpreter/IncrementalParser.cpp:663 root-project#25 0x00007fffeebcbc4e in cling::Interpreter::DeclareInternal (this=0x4a0f30, input=..., CO=..., T=0x7fffffffd680) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/interpreter/cling/lib/Interpreter/Interpreter.cpp:1195 root-project#26 0x00007fffeebca8e8 in cling::Interpreter::declare (this=0x4a0f30, input=..., T=0x7fffffffd680) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/interpreter/cling/lib/Interpreter/Interpreter.cpp:823 root-project#27 0x00007fffeebcb560 in cling::Interpreter::DeclareCFunction (this=0x4a0f30, name=..., code=..., withAccessControl=true) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/interpreter/cling/lib/Interpreter/Interpreter.cpp:1096 root-project#28 0x00007fffeebcb862 in cling::Interpreter::compileFunction (this=0x4a0f30, name=..., code=..., ifUnique=false, withAccessControl=true) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/interpreter/cling/lib/Interpreter/Interpreter.cpp:1140 root-project#29 0x00007fffeeafb83c in TClingCallFunc::compile_wrapper (withAccessControl=true, wrapper=..., wrapper_name=..., this=0xcf3c10) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/metacling/src/TClingCallFunc.cxx:270 root-project#30 TClingCallFunc::make_wrapper (this=this@entry=0xcf3c10) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/metacling/src/TClingCallFunc.cxx:1096 root-project#31 0x00007fffeeafbcb8 in TClingCallFunc::IFacePtr (this=this@entry=0xcf3c10) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/metacling/src/TClingCallFunc.cxx:2233 root-project#32 0x00007fffeeafbe83 in TClingCallFunc::ExecT<long> (address=0x0, this=0xcf3c10) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/metacling/src/TClingCallFunc.cxx:2045 root-project#33 TClingCallFunc::ExecInt (this=0xcf3c10, address=0x0) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/metacling/src/TClingCallFunc.cxx:2065 root-project#34 0x00007ffff7c56e8d in TMethodCall::Execute (this=0xd97710, object=<optimized out>, retLong=@0x7fffffffd958: 0) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/meta/src/TMethodCall.cxx:457 root-project#35 0x0000000000401009 in TMethodCall::Execute(long&) () root-project#36 0x00000000004010ea in long TPluginHandler::ExecPluginImpl<>() () root-project#37 0x000000000040106d in long TPluginHandler::ExecPlugin<>(int) () root-project#38 0x0000000000400e21 in mytest() () root-project#39 0x0000000000400e92 in main ()
pcanal
added a commit
that referenced
this pull request
Oct 11, 2018
…transactions. This fixes https://sft.its.cern.ch/jira/browse/ROOT-9672 by having cling::Interpreter::DeclareCFunction return the transaction containing the compiled code. With the previous code, cling::Interpreter::compileFunction will get confused by transaction created during the callbacks executed during the cling::IncrementalParser::commitTransaction of the main transaction. Reproducer: With a main composed of 'only': int main(int argc, char ** argv) { char const * class_string = (argc == 2) ? argv[1] : "std::vector<int>"; auto const result [[gnu::unused]] = TClass::GetClass(class_string); return 0; } which is a representation of real use case (in a more complex setup) in ART. We were getting: Error in <TClingCallFunc::make_wrapper>: Failed to compile ==== SOURCE BEGIN ==== #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wformat-security" __attribute__((used)) extern "C" void __cf_0(void* obj, int nargs, void** args, void* ret) { if (ret) { (*(TStreamerInfo**)ret) = new TStreamerInfo(); return; } else { new TStreamerInfo(); return; } } #pragma clang diagnostic pop ==== SOURCE END ==== Error in <TClingCallFunc::ExecT>: Called with no wrapper, not implemented! Error in <TVirtualStreamerInfo::Factory>: The plugin handler for TVirtualStreamerInfo was found but failed to create the factory object! The reason is that during TClingCallFunc::make_wrapper, the call to cling::Interpreter::compileFunction ends with: if (const llvm::GlobalValue* GV = getLastTransaction()->getModule()->getNamedValue(name)) However in the 'broken' case, the getLastTransaction does not return the transaction for the code being compiled by DeclareCFunction but instead the one used/created at: #0 cling::IncrementalParser::endTransaction (this=0x4a2980, T=0x8c0fb0) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/interpreter/cling/lib/Interpreter/IncrementalParser.cpp:345 #1 0x00007fffeebc7899 in cling::Interpreter::PushTransactionRAII::pop (this=0x7fffffffcb00) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/interpreter/cling/lib/Interpreter/Interpreter.cpp:111 #2 0x00007fffeebc785e in cling::Interpreter::PushTransactionRAII::~PushTransactionRAII (this=0x7fffffffcb00, __in_chrg=<optimized out>) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/interpreter/cling/lib/Interpreter/Interpreter.cpp:106 #3 0x00007fffeebeb659 in cling::LookupHelper::findScope (this=0x4a9dd0, className=..., diagOnOff=cling::LookupHelper::NoDiagnostics, resultType=0x7fffffffcd08, instantiateTemplate=false) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/interpreter/cling/lib/Interpreter/LookupHelper.cpp:466 #4 0x00007fffeeabe0df in TCling::CheckClassInfo (this=0x4a0550, name=<optimized out>, autoload=<optimized out>, isClassOrNamespaceOnly=<optimized out>) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/metacling/src/TCling.cxx:3630 #5 0x00007ffff7c3040d in TClass::Init (this=this@entry=0xdafd20, name=name@entry=0x7ffff7cb7638 "TGlobal", cversion=cversion@entry=2, typeinfo=typeinfo@entry=0x7ffff7d8b6d8 <typeinfo for TGlobal>, isa=isa@entry=0x477430, dfil=dfil@entry=0x7ffff7cb8cab "TGlobal.h", ifil=<optimized out>, dl=<optimized out>, il=<optimized out>, givenInfo=<optimized out>, silent=<optimized out>) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/meta/src/TClass.cxx:1431 #6 0x00007ffff7c3a1b8 in TClass::TClass (this=0xdafd20, name=0x7ffff7cb7638 "TGlobal", cversion=<optimized out>, info=..., isa=0x477430, dfil=0x7ffff7cb8cab "TGlobal.h", ifil=0x7ffff7cccf88 "/local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/meta/src/TGlobal.cxx", dl=27, il=25, silent=false) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/meta/src/TClass.cxx:1273 #7 0x00007ffff7c3a72a in ROOT::CreateClass (cname=0x7ffff7cb7638 "TGlobal", id=id@entry=2, info=..., isa=isa@entry=0x477430, dfil=dfil@entry=0x7ffff7cb8cab "TGlobal.h", ifil=ifil@entry=0x7ffff7cccf88 "/local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/meta/src/TGlobal.cxx", dl=27, il=25) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/meta/src/TClass.cxx:5607 #8 0x00007ffff7c4b552 in ROOT::Internal::TDefaultInitBehavior::CreateClass (il=25, dl=27, ifil=0x7ffff7cccf88 "/local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/meta/src/TGlobal.cxx", dfil=0x7ffff7cb8cab "TGlobal.h", isa=0x477430, info=..., id=2, cname=<optimized out>, this=0x7ffff7da7508 <ROOT::Internal::DefineBehavior(void*, void*)::theDefault>) at /home/pcanal/root_builds/v6-14-00-patches/opt/include/Rtypes.h:176 #9 ROOT::TGenericClassInfo::GetClass (this=0x7ffff7dab660 <ROOT::GenerateInitInstanceLocal(TGlobal const*)::instance>) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/meta/src/TGenericClassInfo.cxx:250 #10 0x00007ffff7b1a2d8 in TGlobal::Class () at /home/pcanal/root_builds/v6-14-00-patches/opt/core/base/G__Core.cxx:17156 #11 0x00007ffff7ac01de in TGlobal::IsA (this=0xee3bc0) at /home/pcanal/root_builds/v6-14-00-patches/opt/include/TGlobal.h:48 #12 TGlobal::CheckTObjectHashConsistency (this=0xee3bc0) at /home/pcanal/root_builds/v6-14-00-patches/opt/include/TGlobal.h:48 #13 0x00007ffff7be9dcd in TObject::CheckedHash (this=0xee3bc0) at /home/pcanal/root_builds/v6-14-00-patches/opt/include/TObject.h:314 #14 THashTable::GetCheckedHashValue (this=0xe65a20, obj=0xee3bc0) at /home/pcanal/root_builds/v6-14-00-patches/opt/include/THashTable.h:94 #15 THashTable::Add (this=0xe65a20, obj=0xee3bc0) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/cont/src/THashTable.cxx:96 #16 0x00007ffff7be6bf1 in THashList::AddLast (this=this@entry=0x5be690, obj=obj@entry=0xee3bc0) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/cont/src/THashList.cxx:100 #17 0x00007ffff7c4e0d1 in TListOfDataMembers::AddLast (this=0x5be690, obj=0xee3bc0) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/meta/src/TListOfDataMembers.cxx:103 #18 0x00007ffff7ab8785 in TList::Add (obj=0xee3bc0, this=0x5be690) at /home/pcanal/root_builds/v6-14-00-patches/opt/include/TList.h:87 #19 TROOT::GetListOfGlobals (this=0x7ffff7da7a60 <ROOT::Internal::GetROOT1()::alloc>, load=load@entry=false) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/base/src/TROOT.cxx:1767 #20 0x00007fffeeab1058 in TCling::HandleNewDecl (this=0x4a0550, DV=0xedf238, isDeserialized=isDeserialized@entry=true, modifiedTClasses=...) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/metacling/src/TCling.cxx:555 #21 0x00007fffeeabb785 in TCling::UpdateListsOnCommitted (this=0x4a0550, T=...) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/metacling/src/TCling.cxx:6115 #22 0x00007fffeebd0103 in cling::MultiplexInterpreterCallbacks::TransactionCommitted (this=0x57fe20, T=...) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/interpreter/cling/lib/Interpreter/MultiplexInterpreterCallbacks.h:76 #23 0x00007fffeed05d71 in cling::IncrementalParser::commitTransaction (this=0x4a2980, PRT=..., ClearDiagClient=true) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/interpreter/cling/lib/Interpreter/IncrementalParser.cpp:532 #24 0x00007fffeed06399 in cling::IncrementalParser::Compile (this=0x4a2980, input=..., Opts=...) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/interpreter/cling/lib/Interpreter/IncrementalParser.cpp:663 #25 0x00007fffeebcbc4e in cling::Interpreter::DeclareInternal (this=0x4a0f30, input=..., CO=..., T=0x7fffffffd680) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/interpreter/cling/lib/Interpreter/Interpreter.cpp:1195 #26 0x00007fffeebca8e8 in cling::Interpreter::declare (this=0x4a0f30, input=..., T=0x7fffffffd680) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/interpreter/cling/lib/Interpreter/Interpreter.cpp:823 #27 0x00007fffeebcb560 in cling::Interpreter::DeclareCFunction (this=0x4a0f30, name=..., code=..., withAccessControl=true) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/interpreter/cling/lib/Interpreter/Interpreter.cpp:1096 #28 0x00007fffeebcb862 in cling::Interpreter::compileFunction (this=0x4a0f30, name=..., code=..., ifUnique=false, withAccessControl=true) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/interpreter/cling/lib/Interpreter/Interpreter.cpp:1140 #29 0x00007fffeeafb83c in TClingCallFunc::compile_wrapper (withAccessControl=true, wrapper=..., wrapper_name=..., this=0xcf3c10) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/metacling/src/TClingCallFunc.cxx:270 #30 TClingCallFunc::make_wrapper (this=this@entry=0xcf3c10) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/metacling/src/TClingCallFunc.cxx:1096 #31 0x00007fffeeafbcb8 in TClingCallFunc::IFacePtr (this=this@entry=0xcf3c10) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/metacling/src/TClingCallFunc.cxx:2233 #32 0x00007fffeeafbe83 in TClingCallFunc::ExecT<long> (address=0x0, this=0xcf3c10) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/metacling/src/TClingCallFunc.cxx:2045 #33 TClingCallFunc::ExecInt (this=0xcf3c10, address=0x0) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/metacling/src/TClingCallFunc.cxx:2065 #34 0x00007ffff7c56e8d in TMethodCall::Execute (this=0xd97710, object=<optimized out>, retLong=@0x7fffffffd958: 0) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/meta/src/TMethodCall.cxx:457 #35 0x0000000000401009 in TMethodCall::Execute(long&) () #36 0x00000000004010ea in long TPluginHandler::ExecPluginImpl<>() () #37 0x000000000040106d in long TPluginHandler::ExecPlugin<>(int) () #38 0x0000000000400e21 in mytest() () #39 0x0000000000400e92 in main ()
pcanal
added a commit
that referenced
this pull request
Oct 11, 2018
…transactions. This fixes https://sft.its.cern.ch/jira/browse/ROOT-9672 by having cling::Interpreter::DeclareCFunction return the transaction containing the compiled code. With the previous code, cling::Interpreter::compileFunction will get confused by transaction created during the callbacks executed during the cling::IncrementalParser::commitTransaction of the main transaction. Reproducer: With a main composed of 'only': int main(int argc, char ** argv) { char const * class_string = (argc == 2) ? argv[1] : "std::vector<int>"; auto const result [[gnu::unused]] = TClass::GetClass(class_string); return 0; } which is a representation of real use case (in a more complex setup) in ART. We were getting: Error in <TClingCallFunc::make_wrapper>: Failed to compile ==== SOURCE BEGIN ==== #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wformat-security" __attribute__((used)) extern "C" void __cf_0(void* obj, int nargs, void** args, void* ret) { if (ret) { (*(TStreamerInfo**)ret) = new TStreamerInfo(); return; } else { new TStreamerInfo(); return; } } #pragma clang diagnostic pop ==== SOURCE END ==== Error in <TClingCallFunc::ExecT>: Called with no wrapper, not implemented! Error in <TVirtualStreamerInfo::Factory>: The plugin handler for TVirtualStreamerInfo was found but failed to create the factory object! The reason is that during TClingCallFunc::make_wrapper, the call to cling::Interpreter::compileFunction ends with: if (const llvm::GlobalValue* GV = getLastTransaction()->getModule()->getNamedValue(name)) However in the 'broken' case, the getLastTransaction does not return the transaction for the code being compiled by DeclareCFunction but instead the one used/created at: #0 cling::IncrementalParser::endTransaction (this=0x4a2980, T=0x8c0fb0) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/interpreter/cling/lib/Interpreter/IncrementalParser.cpp:345 #1 0x00007fffeebc7899 in cling::Interpreter::PushTransactionRAII::pop (this=0x7fffffffcb00) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/interpreter/cling/lib/Interpreter/Interpreter.cpp:111 #2 0x00007fffeebc785e in cling::Interpreter::PushTransactionRAII::~PushTransactionRAII (this=0x7fffffffcb00, __in_chrg=<optimized out>) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/interpreter/cling/lib/Interpreter/Interpreter.cpp:106 #3 0x00007fffeebeb659 in cling::LookupHelper::findScope (this=0x4a9dd0, className=..., diagOnOff=cling::LookupHelper::NoDiagnostics, resultType=0x7fffffffcd08, instantiateTemplate=false) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/interpreter/cling/lib/Interpreter/LookupHelper.cpp:466 #4 0x00007fffeeabe0df in TCling::CheckClassInfo (this=0x4a0550, name=<optimized out>, autoload=<optimized out>, isClassOrNamespaceOnly=<optimized out>) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/metacling/src/TCling.cxx:3630 #5 0x00007ffff7c3040d in TClass::Init (this=this@entry=0xdafd20, name=name@entry=0x7ffff7cb7638 "TGlobal", cversion=cversion@entry=2, typeinfo=typeinfo@entry=0x7ffff7d8b6d8 <typeinfo for TGlobal>, isa=isa@entry=0x477430, dfil=dfil@entry=0x7ffff7cb8cab "TGlobal.h", ifil=<optimized out>, dl=<optimized out>, il=<optimized out>, givenInfo=<optimized out>, silent=<optimized out>) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/meta/src/TClass.cxx:1431 #6 0x00007ffff7c3a1b8 in TClass::TClass (this=0xdafd20, name=0x7ffff7cb7638 "TGlobal", cversion=<optimized out>, info=..., isa=0x477430, dfil=0x7ffff7cb8cab "TGlobal.h", ifil=0x7ffff7cccf88 "/local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/meta/src/TGlobal.cxx", dl=27, il=25, silent=false) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/meta/src/TClass.cxx:1273 #7 0x00007ffff7c3a72a in ROOT::CreateClass (cname=0x7ffff7cb7638 "TGlobal", id=id@entry=2, info=..., isa=isa@entry=0x477430, dfil=dfil@entry=0x7ffff7cb8cab "TGlobal.h", ifil=ifil@entry=0x7ffff7cccf88 "/local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/meta/src/TGlobal.cxx", dl=27, il=25) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/meta/src/TClass.cxx:5607 #8 0x00007ffff7c4b552 in ROOT::Internal::TDefaultInitBehavior::CreateClass (il=25, dl=27, ifil=0x7ffff7cccf88 "/local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/meta/src/TGlobal.cxx", dfil=0x7ffff7cb8cab "TGlobal.h", isa=0x477430, info=..., id=2, cname=<optimized out>, this=0x7ffff7da7508 <ROOT::Internal::DefineBehavior(void*, void*)::theDefault>) at /home/pcanal/root_builds/v6-14-00-patches/opt/include/Rtypes.h:176 #9 ROOT::TGenericClassInfo::GetClass (this=0x7ffff7dab660 <ROOT::GenerateInitInstanceLocal(TGlobal const*)::instance>) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/meta/src/TGenericClassInfo.cxx:250 #10 0x00007ffff7b1a2d8 in TGlobal::Class () at /home/pcanal/root_builds/v6-14-00-patches/opt/core/base/G__Core.cxx:17156 #11 0x00007ffff7ac01de in TGlobal::IsA (this=0xee3bc0) at /home/pcanal/root_builds/v6-14-00-patches/opt/include/TGlobal.h:48 #12 TGlobal::CheckTObjectHashConsistency (this=0xee3bc0) at /home/pcanal/root_builds/v6-14-00-patches/opt/include/TGlobal.h:48 #13 0x00007ffff7be9dcd in TObject::CheckedHash (this=0xee3bc0) at /home/pcanal/root_builds/v6-14-00-patches/opt/include/TObject.h:314 #14 THashTable::GetCheckedHashValue (this=0xe65a20, obj=0xee3bc0) at /home/pcanal/root_builds/v6-14-00-patches/opt/include/THashTable.h:94 #15 THashTable::Add (this=0xe65a20, obj=0xee3bc0) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/cont/src/THashTable.cxx:96 #16 0x00007ffff7be6bf1 in THashList::AddLast (this=this@entry=0x5be690, obj=obj@entry=0xee3bc0) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/cont/src/THashList.cxx:100 #17 0x00007ffff7c4e0d1 in TListOfDataMembers::AddLast (this=0x5be690, obj=0xee3bc0) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/meta/src/TListOfDataMembers.cxx:103 #18 0x00007ffff7ab8785 in TList::Add (obj=0xee3bc0, this=0x5be690) at /home/pcanal/root_builds/v6-14-00-patches/opt/include/TList.h:87 #19 TROOT::GetListOfGlobals (this=0x7ffff7da7a60 <ROOT::Internal::GetROOT1()::alloc>, load=load@entry=false) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/base/src/TROOT.cxx:1767 #20 0x00007fffeeab1058 in TCling::HandleNewDecl (this=0x4a0550, DV=0xedf238, isDeserialized=isDeserialized@entry=true, modifiedTClasses=...) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/metacling/src/TCling.cxx:555 #21 0x00007fffeeabb785 in TCling::UpdateListsOnCommitted (this=0x4a0550, T=...) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/metacling/src/TCling.cxx:6115 #22 0x00007fffeebd0103 in cling::MultiplexInterpreterCallbacks::TransactionCommitted (this=0x57fe20, T=...) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/interpreter/cling/lib/Interpreter/MultiplexInterpreterCallbacks.h:76 #23 0x00007fffeed05d71 in cling::IncrementalParser::commitTransaction (this=0x4a2980, PRT=..., ClearDiagClient=true) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/interpreter/cling/lib/Interpreter/IncrementalParser.cpp:532 #24 0x00007fffeed06399 in cling::IncrementalParser::Compile (this=0x4a2980, input=..., Opts=...) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/interpreter/cling/lib/Interpreter/IncrementalParser.cpp:663 #25 0x00007fffeebcbc4e in cling::Interpreter::DeclareInternal (this=0x4a0f30, input=..., CO=..., T=0x7fffffffd680) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/interpreter/cling/lib/Interpreter/Interpreter.cpp:1195 #26 0x00007fffeebca8e8 in cling::Interpreter::declare (this=0x4a0f30, input=..., T=0x7fffffffd680) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/interpreter/cling/lib/Interpreter/Interpreter.cpp:823 #27 0x00007fffeebcb560 in cling::Interpreter::DeclareCFunction (this=0x4a0f30, name=..., code=..., withAccessControl=true) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/interpreter/cling/lib/Interpreter/Interpreter.cpp:1096 #28 0x00007fffeebcb862 in cling::Interpreter::compileFunction (this=0x4a0f30, name=..., code=..., ifUnique=false, withAccessControl=true) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/interpreter/cling/lib/Interpreter/Interpreter.cpp:1140 #29 0x00007fffeeafb83c in TClingCallFunc::compile_wrapper (withAccessControl=true, wrapper=..., wrapper_name=..., this=0xcf3c10) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/metacling/src/TClingCallFunc.cxx:270 #30 TClingCallFunc::make_wrapper (this=this@entry=0xcf3c10) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/metacling/src/TClingCallFunc.cxx:1096 #31 0x00007fffeeafbcb8 in TClingCallFunc::IFacePtr (this=this@entry=0xcf3c10) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/metacling/src/TClingCallFunc.cxx:2233 #32 0x00007fffeeafbe83 in TClingCallFunc::ExecT<long> (address=0x0, this=0xcf3c10) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/metacling/src/TClingCallFunc.cxx:2045 #33 TClingCallFunc::ExecInt (this=0xcf3c10, address=0x0) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/metacling/src/TClingCallFunc.cxx:2065 #34 0x00007ffff7c56e8d in TMethodCall::Execute (this=0xd97710, object=<optimized out>, retLong=@0x7fffffffd958: 0) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/meta/src/TMethodCall.cxx:457 #35 0x0000000000401009 in TMethodCall::Execute(long&) () #36 0x00000000004010ea in long TPluginHandler::ExecPluginImpl<>() () #37 0x000000000040106d in long TPluginHandler::ExecPlugin<>(int) () #38 0x0000000000400e21 in mytest() () #39 0x0000000000400e92 in main ()
hageboeck
pushed a commit
to hageboeck/root
that referenced
this pull request
Oct 16, 2018
…transactions. This fixes https://sft.its.cern.ch/jira/browse/ROOT-9672 by having cling::Interpreter::DeclareCFunction return the transaction containing the compiled code. With the previous code, cling::Interpreter::compileFunction will get confused by transaction created during the callbacks executed during the cling::IncrementalParser::commitTransaction of the main transaction. Reproducer: With a main composed of 'only': int main(int argc, char ** argv) { char const * class_string = (argc == 2) ? argv[1] : "std::vector<int>"; auto const result [[gnu::unused]] = TClass::GetClass(class_string); return 0; } which is a representation of real use case (in a more complex setup) in ART. We were getting: Error in <TClingCallFunc::make_wrapper>: Failed to compile ==== SOURCE BEGIN ==== #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wformat-security" __attribute__((used)) extern "C" void __cf_0(void* obj, int nargs, void** args, void* ret) { if (ret) { (*(TStreamerInfo**)ret) = new TStreamerInfo(); return; } else { new TStreamerInfo(); return; } } #pragma clang diagnostic pop ==== SOURCE END ==== Error in <TClingCallFunc::ExecT>: Called with no wrapper, not implemented! Error in <TVirtualStreamerInfo::Factory>: The plugin handler for TVirtualStreamerInfo was found but failed to create the factory object! The reason is that during TClingCallFunc::make_wrapper, the call to cling::Interpreter::compileFunction ends with: if (const llvm::GlobalValue* GV = getLastTransaction()->getModule()->getNamedValue(name)) However in the 'broken' case, the getLastTransaction does not return the transaction for the code being compiled by DeclareCFunction but instead the one used/created at: #0 cling::IncrementalParser::endTransaction (this=0x4a2980, T=0x8c0fb0) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/interpreter/cling/lib/Interpreter/IncrementalParser.cpp:345 #1 0x00007fffeebc7899 in cling::Interpreter::PushTransactionRAII::pop (this=0x7fffffffcb00) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/interpreter/cling/lib/Interpreter/Interpreter.cpp:111 #2 0x00007fffeebc785e in cling::Interpreter::PushTransactionRAII::~PushTransactionRAII (this=0x7fffffffcb00, __in_chrg=<optimized out>) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/interpreter/cling/lib/Interpreter/Interpreter.cpp:106 #3 0x00007fffeebeb659 in cling::LookupHelper::findScope (this=0x4a9dd0, className=..., diagOnOff=cling::LookupHelper::NoDiagnostics, resultType=0x7fffffffcd08, instantiateTemplate=false) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/interpreter/cling/lib/Interpreter/LookupHelper.cpp:466 #4 0x00007fffeeabe0df in TCling::CheckClassInfo (this=0x4a0550, name=<optimized out>, autoload=<optimized out>, isClassOrNamespaceOnly=<optimized out>) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/metacling/src/TCling.cxx:3630 #5 0x00007ffff7c3040d in TClass::Init (this=this@entry=0xdafd20, name=name@entry=0x7ffff7cb7638 "TGlobal", cversion=cversion@entry=2, typeinfo=typeinfo@entry=0x7ffff7d8b6d8 <typeinfo for TGlobal>, isa=isa@entry=0x477430, dfil=dfil@entry=0x7ffff7cb8cab "TGlobal.h", ifil=<optimized out>, dl=<optimized out>, il=<optimized out>, givenInfo=<optimized out>, silent=<optimized out>) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/meta/src/TClass.cxx:1431 #6 0x00007ffff7c3a1b8 in TClass::TClass (this=0xdafd20, name=0x7ffff7cb7638 "TGlobal", cversion=<optimized out>, info=..., isa=0x477430, dfil=0x7ffff7cb8cab "TGlobal.h", ifil=0x7ffff7cccf88 "/local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/meta/src/TGlobal.cxx", dl=27, il=25, silent=false) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/meta/src/TClass.cxx:1273 #7 0x00007ffff7c3a72a in ROOT::CreateClass (cname=0x7ffff7cb7638 "TGlobal", id=id@entry=2, info=..., isa=isa@entry=0x477430, dfil=dfil@entry=0x7ffff7cb8cab "TGlobal.h", ifil=ifil@entry=0x7ffff7cccf88 "/local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/meta/src/TGlobal.cxx", dl=27, il=25) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/meta/src/TClass.cxx:5607 #8 0x00007ffff7c4b552 in ROOT::Internal::TDefaultInitBehavior::CreateClass (il=25, dl=27, ifil=0x7ffff7cccf88 "/local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/meta/src/TGlobal.cxx", dfil=0x7ffff7cb8cab "TGlobal.h", isa=0x477430, info=..., id=2, cname=<optimized out>, this=0x7ffff7da7508 <ROOT::Internal::DefineBehavior(void*, void*)::theDefault>) at /home/pcanal/root_builds/v6-14-00-patches/opt/include/Rtypes.h:176 #9 ROOT::TGenericClassInfo::GetClass (this=0x7ffff7dab660 <ROOT::GenerateInitInstanceLocal(TGlobal const*)::instance>) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/meta/src/TGenericClassInfo.cxx:250 #10 0x00007ffff7b1a2d8 in TGlobal::Class () at /home/pcanal/root_builds/v6-14-00-patches/opt/core/base/G__Core.cxx:17156 #11 0x00007ffff7ac01de in TGlobal::IsA (this=0xee3bc0) at /home/pcanal/root_builds/v6-14-00-patches/opt/include/TGlobal.h:48 #12 TGlobal::CheckTObjectHashConsistency (this=0xee3bc0) at /home/pcanal/root_builds/v6-14-00-patches/opt/include/TGlobal.h:48 #13 0x00007ffff7be9dcd in TObject::CheckedHash (this=0xee3bc0) at /home/pcanal/root_builds/v6-14-00-patches/opt/include/TObject.h:314 root-project#14 THashTable::GetCheckedHashValue (this=0xe65a20, obj=0xee3bc0) at /home/pcanal/root_builds/v6-14-00-patches/opt/include/THashTable.h:94 root-project#15 THashTable::Add (this=0xe65a20, obj=0xee3bc0) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/cont/src/THashTable.cxx:96 root-project#16 0x00007ffff7be6bf1 in THashList::AddLast (this=this@entry=0x5be690, obj=obj@entry=0xee3bc0) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/cont/src/THashList.cxx:100 root-project#17 0x00007ffff7c4e0d1 in TListOfDataMembers::AddLast (this=0x5be690, obj=0xee3bc0) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/meta/src/TListOfDataMembers.cxx:103 root-project#18 0x00007ffff7ab8785 in TList::Add (obj=0xee3bc0, this=0x5be690) at /home/pcanal/root_builds/v6-14-00-patches/opt/include/TList.h:87 root-project#19 TROOT::GetListOfGlobals (this=0x7ffff7da7a60 <ROOT::Internal::GetROOT1()::alloc>, load=load@entry=false) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/base/src/TROOT.cxx:1767 root-project#20 0x00007fffeeab1058 in TCling::HandleNewDecl (this=0x4a0550, DV=0xedf238, isDeserialized=isDeserialized@entry=true, modifiedTClasses=...) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/metacling/src/TCling.cxx:555 root-project#21 0x00007fffeeabb785 in TCling::UpdateListsOnCommitted (this=0x4a0550, T=...) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/metacling/src/TCling.cxx:6115 root-project#22 0x00007fffeebd0103 in cling::MultiplexInterpreterCallbacks::TransactionCommitted (this=0x57fe20, T=...) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/interpreter/cling/lib/Interpreter/MultiplexInterpreterCallbacks.h:76 root-project#23 0x00007fffeed05d71 in cling::IncrementalParser::commitTransaction (this=0x4a2980, PRT=..., ClearDiagClient=true) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/interpreter/cling/lib/Interpreter/IncrementalParser.cpp:532 root-project#24 0x00007fffeed06399 in cling::IncrementalParser::Compile (this=0x4a2980, input=..., Opts=...) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/interpreter/cling/lib/Interpreter/IncrementalParser.cpp:663 root-project#25 0x00007fffeebcbc4e in cling::Interpreter::DeclareInternal (this=0x4a0f30, input=..., CO=..., T=0x7fffffffd680) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/interpreter/cling/lib/Interpreter/Interpreter.cpp:1195 root-project#26 0x00007fffeebca8e8 in cling::Interpreter::declare (this=0x4a0f30, input=..., T=0x7fffffffd680) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/interpreter/cling/lib/Interpreter/Interpreter.cpp:823 root-project#27 0x00007fffeebcb560 in cling::Interpreter::DeclareCFunction (this=0x4a0f30, name=..., code=..., withAccessControl=true) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/interpreter/cling/lib/Interpreter/Interpreter.cpp:1096 root-project#28 0x00007fffeebcb862 in cling::Interpreter::compileFunction (this=0x4a0f30, name=..., code=..., ifUnique=false, withAccessControl=true) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/interpreter/cling/lib/Interpreter/Interpreter.cpp:1140 root-project#29 0x00007fffeeafb83c in TClingCallFunc::compile_wrapper (withAccessControl=true, wrapper=..., wrapper_name=..., this=0xcf3c10) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/metacling/src/TClingCallFunc.cxx:270 root-project#30 TClingCallFunc::make_wrapper (this=this@entry=0xcf3c10) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/metacling/src/TClingCallFunc.cxx:1096 root-project#31 0x00007fffeeafbcb8 in TClingCallFunc::IFacePtr (this=this@entry=0xcf3c10) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/metacling/src/TClingCallFunc.cxx:2233 root-project#32 0x00007fffeeafbe83 in TClingCallFunc::ExecT<long> (address=0x0, this=0xcf3c10) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/metacling/src/TClingCallFunc.cxx:2045 root-project#33 TClingCallFunc::ExecInt (this=0xcf3c10, address=0x0) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/metacling/src/TClingCallFunc.cxx:2065 root-project#34 0x00007ffff7c56e8d in TMethodCall::Execute (this=0xd97710, object=<optimized out>, retLong=@0x7fffffffd958: 0) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/meta/src/TMethodCall.cxx:457 root-project#35 0x0000000000401009 in TMethodCall::Execute(long&) () root-project#36 0x00000000004010ea in long TPluginHandler::ExecPluginImpl<>() () root-project#37 0x000000000040106d in long TPluginHandler::ExecPlugin<>(int) () root-project#38 0x0000000000400e21 in mytest() () root-project#39 0x0000000000400e92 in main ()
alja
referenced
this pull request
in alja/root
Jan 17, 2019
eve7: add EveScene.js which is responsible for all scene operations
JavierCVilla
pushed a commit
to JavierCVilla/root
that referenced
this pull request
Feb 12, 2019
…transactions. This fixes https://sft.its.cern.ch/jira/browse/ROOT-9672 by having cling::Interpreter::DeclareCFunction return the transaction containing the compiled code. With the previous code, cling::Interpreter::compileFunction will get confused by transaction created during the callbacks executed during the cling::IncrementalParser::commitTransaction of the main transaction. Reproducer: With a main composed of 'only': int main(int argc, char ** argv) { char const * class_string = (argc == 2) ? argv[1] : "std::vector<int>"; auto const result [[gnu::unused]] = TClass::GetClass(class_string); return 0; } which is a representation of real use case (in a more complex setup) in ART. We were getting: Error in <TClingCallFunc::make_wrapper>: Failed to compile ==== SOURCE BEGIN ==== #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wformat-security" __attribute__((used)) extern "C" void __cf_0(void* obj, int nargs, void** args, void* ret) { if (ret) { (*(TStreamerInfo**)ret) = new TStreamerInfo(); return; } else { new TStreamerInfo(); return; } } #pragma clang diagnostic pop ==== SOURCE END ==== Error in <TClingCallFunc::ExecT>: Called with no wrapper, not implemented! Error in <TVirtualStreamerInfo::Factory>: The plugin handler for TVirtualStreamerInfo was found but failed to create the factory object! The reason is that during TClingCallFunc::make_wrapper, the call to cling::Interpreter::compileFunction ends with: if (const llvm::GlobalValue* GV = getLastTransaction()->getModule()->getNamedValue(name)) However in the 'broken' case, the getLastTransaction does not return the transaction for the code being compiled by DeclareCFunction but instead the one used/created at: #0 cling::IncrementalParser::endTransaction (this=0x4a2980, T=0x8c0fb0) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/interpreter/cling/lib/Interpreter/IncrementalParser.cpp:345 root-project#1 0x00007fffeebc7899 in cling::Interpreter::PushTransactionRAII::pop (this=0x7fffffffcb00) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/interpreter/cling/lib/Interpreter/Interpreter.cpp:111 root-project#2 0x00007fffeebc785e in cling::Interpreter::PushTransactionRAII::~PushTransactionRAII (this=0x7fffffffcb00, __in_chrg=<optimized out>) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/interpreter/cling/lib/Interpreter/Interpreter.cpp:106 root-project#3 0x00007fffeebeb659 in cling::LookupHelper::findScope (this=0x4a9dd0, className=..., diagOnOff=cling::LookupHelper::NoDiagnostics, resultType=0x7fffffffcd08, instantiateTemplate=false) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/interpreter/cling/lib/Interpreter/LookupHelper.cpp:466 root-project#4 0x00007fffeeabe0df in TCling::CheckClassInfo (this=0x4a0550, name=<optimized out>, autoload=<optimized out>, isClassOrNamespaceOnly=<optimized out>) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/metacling/src/TCling.cxx:3630 root-project#5 0x00007ffff7c3040d in TClass::Init (this=this@entry=0xdafd20, name=name@entry=0x7ffff7cb7638 "TGlobal", cversion=cversion@entry=2, typeinfo=typeinfo@entry=0x7ffff7d8b6d8 <typeinfo for TGlobal>, isa=isa@entry=0x477430, dfil=dfil@entry=0x7ffff7cb8cab "TGlobal.h", ifil=<optimized out>, dl=<optimized out>, il=<optimized out>, givenInfo=<optimized out>, silent=<optimized out>) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/meta/src/TClass.cxx:1431 root-project#6 0x00007ffff7c3a1b8 in TClass::TClass (this=0xdafd20, name=0x7ffff7cb7638 "TGlobal", cversion=<optimized out>, info=..., isa=0x477430, dfil=0x7ffff7cb8cab "TGlobal.h", ifil=0x7ffff7cccf88 "/local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/meta/src/TGlobal.cxx", dl=27, il=25, silent=false) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/meta/src/TClass.cxx:1273 root-project#7 0x00007ffff7c3a72a in ROOT::CreateClass (cname=0x7ffff7cb7638 "TGlobal", id=id@entry=2, info=..., isa=isa@entry=0x477430, dfil=dfil@entry=0x7ffff7cb8cab "TGlobal.h", ifil=ifil@entry=0x7ffff7cccf88 "/local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/meta/src/TGlobal.cxx", dl=27, il=25) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/meta/src/TClass.cxx:5607 root-project#8 0x00007ffff7c4b552 in ROOT::Internal::TDefaultInitBehavior::CreateClass (il=25, dl=27, ifil=0x7ffff7cccf88 "/local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/meta/src/TGlobal.cxx", dfil=0x7ffff7cb8cab "TGlobal.h", isa=0x477430, info=..., id=2, cname=<optimized out>, this=0x7ffff7da7508 <ROOT::Internal::DefineBehavior(void*, void*)::theDefault>) at /home/pcanal/root_builds/v6-14-00-patches/opt/include/Rtypes.h:176 root-project#9 ROOT::TGenericClassInfo::GetClass (this=0x7ffff7dab660 <ROOT::GenerateInitInstanceLocal(TGlobal const*)::instance>) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/meta/src/TGenericClassInfo.cxx:250 root-project#10 0x00007ffff7b1a2d8 in TGlobal::Class () at /home/pcanal/root_builds/v6-14-00-patches/opt/core/base/G__Core.cxx:17156 root-project#11 0x00007ffff7ac01de in TGlobal::IsA (this=0xee3bc0) at /home/pcanal/root_builds/v6-14-00-patches/opt/include/TGlobal.h:48 root-project#12 TGlobal::CheckTObjectHashConsistency (this=0xee3bc0) at /home/pcanal/root_builds/v6-14-00-patches/opt/include/TGlobal.h:48 root-project#13 0x00007ffff7be9dcd in TObject::CheckedHash (this=0xee3bc0) at /home/pcanal/root_builds/v6-14-00-patches/opt/include/TObject.h:314 root-project#14 THashTable::GetCheckedHashValue (this=0xe65a20, obj=0xee3bc0) at /home/pcanal/root_builds/v6-14-00-patches/opt/include/THashTable.h:94 root-project#15 THashTable::Add (this=0xe65a20, obj=0xee3bc0) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/cont/src/THashTable.cxx:96 root-project#16 0x00007ffff7be6bf1 in THashList::AddLast (this=this@entry=0x5be690, obj=obj@entry=0xee3bc0) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/cont/src/THashList.cxx:100 root-project#17 0x00007ffff7c4e0d1 in TListOfDataMembers::AddLast (this=0x5be690, obj=0xee3bc0) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/meta/src/TListOfDataMembers.cxx:103 root-project#18 0x00007ffff7ab8785 in TList::Add (obj=0xee3bc0, this=0x5be690) at /home/pcanal/root_builds/v6-14-00-patches/opt/include/TList.h:87 root-project#19 TROOT::GetListOfGlobals (this=0x7ffff7da7a60 <ROOT::Internal::GetROOT1()::alloc>, load=load@entry=false) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/base/src/TROOT.cxx:1767 root-project#20 0x00007fffeeab1058 in TCling::HandleNewDecl (this=0x4a0550, DV=0xedf238, isDeserialized=isDeserialized@entry=true, modifiedTClasses=...) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/metacling/src/TCling.cxx:555 root-project#21 0x00007fffeeabb785 in TCling::UpdateListsOnCommitted (this=0x4a0550, T=...) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/metacling/src/TCling.cxx:6115 root-project#22 0x00007fffeebd0103 in cling::MultiplexInterpreterCallbacks::TransactionCommitted (this=0x57fe20, T=...) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/interpreter/cling/lib/Interpreter/MultiplexInterpreterCallbacks.h:76 root-project#23 0x00007fffeed05d71 in cling::IncrementalParser::commitTransaction (this=0x4a2980, PRT=..., ClearDiagClient=true) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/interpreter/cling/lib/Interpreter/IncrementalParser.cpp:532 root-project#24 0x00007fffeed06399 in cling::IncrementalParser::Compile (this=0x4a2980, input=..., Opts=...) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/interpreter/cling/lib/Interpreter/IncrementalParser.cpp:663 root-project#25 0x00007fffeebcbc4e in cling::Interpreter::DeclareInternal (this=0x4a0f30, input=..., CO=..., T=0x7fffffffd680) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/interpreter/cling/lib/Interpreter/Interpreter.cpp:1195 root-project#26 0x00007fffeebca8e8 in cling::Interpreter::declare (this=0x4a0f30, input=..., T=0x7fffffffd680) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/interpreter/cling/lib/Interpreter/Interpreter.cpp:823 root-project#27 0x00007fffeebcb560 in cling::Interpreter::DeclareCFunction (this=0x4a0f30, name=..., code=..., withAccessControl=true) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/interpreter/cling/lib/Interpreter/Interpreter.cpp:1096 root-project#28 0x00007fffeebcb862 in cling::Interpreter::compileFunction (this=0x4a0f30, name=..., code=..., ifUnique=false, withAccessControl=true) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/interpreter/cling/lib/Interpreter/Interpreter.cpp:1140 root-project#29 0x00007fffeeafb83c in TClingCallFunc::compile_wrapper (withAccessControl=true, wrapper=..., wrapper_name=..., this=0xcf3c10) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/metacling/src/TClingCallFunc.cxx:270 root-project#30 TClingCallFunc::make_wrapper (this=this@entry=0xcf3c10) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/metacling/src/TClingCallFunc.cxx:1096 root-project#31 0x00007fffeeafbcb8 in TClingCallFunc::IFacePtr (this=this@entry=0xcf3c10) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/metacling/src/TClingCallFunc.cxx:2233 root-project#32 0x00007fffeeafbe83 in TClingCallFunc::ExecT<long> (address=0x0, this=0xcf3c10) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/metacling/src/TClingCallFunc.cxx:2045 root-project#33 TClingCallFunc::ExecInt (this=0xcf3c10, address=0x0) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/metacling/src/TClingCallFunc.cxx:2065 root-project#34 0x00007ffff7c56e8d in TMethodCall::Execute (this=0xd97710, object=<optimized out>, retLong=@0x7fffffffd958: 0) at /local2/pcanal/cint_working/rootcling/v6-14-00-patches/core/meta/src/TMethodCall.cxx:457 root-project#35 0x0000000000401009 in TMethodCall::Execute(long&) () root-project#36 0x00000000004010ea in long TPluginHandler::ExecPluginImpl<>() () root-project#37 0x000000000040106d in long TPluginHandler::ExecPlugin<>(int) () root-project#38 0x0000000000400e21 in mytest() () root-project#39 0x0000000000400e92 in main ()
Danish00786
referenced
this pull request
Oct 18, 2019
… used for the build tree. If OFF, the RPATH is removed from the installation, otherwise the RPATH in the installation points to the install libdir. Fixes ROOT-7663 - failure to compile master branch on ubuntu 15.04
Closed
Axel-Naumann
added a commit
that referenced
this pull request
May 5, 2021
Before, MetaParser might have pointed to a StringRef whose storage was gone, see asan failure in roottest/cling/other/runfileClose.C below. This was caused by recursive uses of MetaParser; see stack trace below: the inner recursion returned, but as the same MetaParser object was used by both frames, the objects cursor now pointed to freed memory. Instead, create a MetaParser (and MetaLexer) object per input. That way, their lifetime corresponds to the lifetime of their input. ================================================================= ==529104==ERROR: AddressSanitizer: stack-use-after-return on address 0x7ffff3afd82a at pc 0x7fffea18df6d bp 0x7fffffff8170 sp 0x7fffffff8168 READ of size 1 at 0x7ffff3afd82a thread T0 [Detaching after fork from child process 529183] #0 0x7fffea18df6c in cling::MetaLexer::Lex(cling::Token&) src/interpreter/cling/lib/MetaProcessor/MetaLexer.cpp:58:11 #1 0x7fffea190d7c in cling::MetaParser::lookAhead(unsigned int) src/interpreter/cling/lib/MetaProcessor/MetaParser.cpp:89:15 #2 0x7fffea190bd5 in cling::MetaParser::consumeToken() src/interpreter/cling/lib/MetaProcessor/MetaParser.cpp:49:5 #3 0x7fffea191d4d in cling::MetaParser::isLCommand(cling::MetaSema::ActionResult&) src/interpreter/cling/lib/MetaProcessor/MetaParser.cpp:147:9 #4 0x7fffea1914dd in cling::MetaParser::isCommand(cling::MetaSema::ActionResult&, cling::Value*) src/interpreter/cling/lib/MetaProcessor/MetaParser.cpp:123:12 #5 0x7fffea191216 in cling::MetaParser::isMetaCommand(cling::MetaSema::ActionResult&, cling::Value*) src/interpreter/cling/lib/MetaProcessor/MetaParser.cpp:101:33 #6 0x7fffea14e5aa in cling::MetaProcessor::process(llvm::StringRef, cling::Interpreter::CompilationResult&, cling::Value*, bool) src/interpreter/cling/lib/MetaProcessor/MetaProcessor.cpp:317:24 #7 0x7fffe99b67b7 in HandleInterpreterException(cling::MetaProcessor*, char const*, cling::Interpreter::CompilationResult&, cling::Value*) src/core/metacling/src/TCling.cxx:2431:29 #8 0x7fffe99bde30 in TCling::Load(char const*, bool) src/core/metacling/src/TCling.cxx:3454:10 #9 0x7ffff7865f11 in TSystem::Load(char const*, char const*, bool) src/core/base/src/TSystem.cxx:1941:27 #10 0x7ffff7b8a0e3 in TUnixSystem::Load(char const*, char const*, bool) src/core/unix/src/TUnixSystem.cxx:2789:20 #11 0x7fffd78dd08b (<unknown module>) #12 0x7fffe9f8a5d9 in cling::IncrementalExecutor::executeWrapper(llvm::StringRef, cling::Value*) const src/interpreter/cling/lib/Interpreter/IncrementalExecutor.cpp:376:3 #13 0x7fffe9d73dc2 in cling::Interpreter::RunFunction(clang::FunctionDecl const*, cling::Value*) src/interpreter/cling/lib/Interpreter/Interpreter.cpp:1141:20 #14 0x7fffe9d6e317 in cling::Interpreter::EvaluateInternal(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, cling::CompilationOptions, cling::Value*, cling::Transaction**, unsigned long) src/interpreter/cling/lib/Interpreter/Interpreter.cpp:1391:29 #15 0x7fffe9d6c1fe in cling::Interpreter::process(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, cling::Value*, cling::Transaction**, bool) src/interpreter/cling/lib/Interpreter/Interpreter.cpp:819:9 #16 0x7fffea151826 in cling::MetaProcessor::readInputFromFile(llvm::StringRef, cling::Value*, unsigned long, bool) src/interpreter/cling/lib/MetaProcessor/MetaProcessor.cpp:507:22 #17 0x7fffe99b585b in TCling::ProcessLine(char const*, TInterpreter::EErrorCode*) src/core/metacling/src/TCling.cxx:2570:39 #18 0x7fffe99bbfee in TCling::ProcessLineSynch(char const*, TInterpreter::EErrorCode*) src/core/metacling/src/TCling.cxx:3496:17 #19 0x7ffff77203d3 in TApplication::ExecuteFile(char const*, int*, bool) src/core/base/src/TApplication.cxx:1608:30 #20 0x7ffff771ebdf in TApplication::ProcessFile(char const*, int*, bool) src/core/base/src/TApplication.cxx:1480:11 #21 0x7ffff771e385 in TApplication::ProcessLine(char const*, bool, int*) src/core/base/src/TApplication.cxx:1453:14 #22 0x7ffff7f8157a in TRint::ProcessLineNr(char const*, char const*, int*) src/core/rint/src/TRint.cxx:766:11 #23 0x7ffff7f802f0 in TRint::Run(bool) src/core/rint/src/TRint.cxx:424:22 #24 0x4ff96d in main src/main/src/rmain.cxx:30:12 #25 0x7ffff6e040b2 in __libc_start_main /build/glibc-YbNSs7/glibc-2.31/csu/../csu/libc-start.c:308:16 #26 0x41f35d in _start (asan/bin/root.exe+0x41f35d) Address 0x7ffff3afd82a is located in stack of thread T0 at offset 42 in frame #0 0x7fffe99b3d8f in TCling::ProcessLine(char const*, TInterpreter::EErrorCode*) src/core/metacling/src/TCling.cxx:2456 This frame has 21 object(s): [32, 56) 'sLine' (line 2462) <== Memory access at offset 42 is inside this variable [96, 104) 'R__guard2471' (line 2471) [128, 136) 'R__guard2488' (line 2488) [160, 176) 'interpreterFlagsRAII' (line 2491) [192, 240) 'result' (line 2511) [272, 276) 'compRes' (line 2512) [288, 312) 'mod_line' (line 2517) [352, 376) 'aclicMode' (line 2518) [416, 440) 'arguments' (line 2519) [480, 504) 'io' (line 2520) [544, 568) 'fname' (line 2521) [608, 632) 'ref.tmp' (line 2547) [672, 696) 'ref.tmp145' (line 2547) [736, 768) 'code' (line 2555) [800, 832) 'codeline' (line 2556) [864, 1384) 'in' (line 2559) [1520, 1552) 'ref.tmp176' (line 2562) [1584, 1600) 'agg.tmp' [1616, 1624) 'ref.tmp198' (line 2568) [1648, 1664) 'agg.tmp207' [1680, 1696) 'autoParseRaii' (line 2588) HINT: this may be a false positive if your program uses some custom stack unwind mechanism, swapcontext or vfork (longjmp and C++ exceptions *are* supported) SUMMARY: AddressSanitizer: stack-use-after-return src/interpreter/cling/lib/MetaProcessor/MetaLexer.cpp:58:11 in cling::MetaLexer::Lex(cling::Token&) Shadow bytes around the buggy address: 0x10007e757ab0: f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 0x10007e757ac0: f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 0x10007e757ad0: f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 0x10007e757ae0: f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 0x10007e757af0: f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 =>0x10007e757b00: f5 f5 f5 f5 f5[f5]f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 0x10007e757b10: f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 0x10007e757b20: f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 0x10007e757b30: f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 0x10007e757b40: f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 0x10007e757b50: f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 Shadow byte legend (one shadow byte represents 8 application bytes): Addressable: 00 Partially addressable: 01 02 03 04 05 06 07 Heap left redzone: fa Freed heap region: fd Stack left redzone: f1 Stack mid redzone: f2 Stack right redzone: f3 Stack after return: f5 Stack use after scope: f8 Global redzone: f9 Global init order: f6 Poisoned by user: f7 Container overflow: fc Array cookie: ac Intra object redzone: bb ASan internal: fe Left alloca redzone: ca Right alloca redzone: cb Shadow gap: cc ==529104==ABORTING at src/interpreter/cling/lib/MetaProcessor/MetaLexer.cpp:49 at src/interpreter/cling/lib/MetaProcessor/MetaParser.cpp:41 compRes=@0x7ffff3afd910: cling::Interpreter::kSuccess, result=0x7ffff3afd8c0, disableValuePrinting=false) at src/interpreter/cling/lib/MetaProcessor/MetaProcessor.cpp:314 input_line=0x7ffff3afd829 "#define XYZ 21", compRes=@0x7ffff3afd910: cling::Interpreter::kSuccess, result=0x7ffff3afd8c0) at src/core/metacling/src/TCling.cxx:2431 error=0x7fffd78cb0f4 <x>) at src/core/metacling/src/TCling.cxx:2591 sync=false, err=0x7fffd78cb0f4 <x>) at src/core/base/src/TApplication.cxx:1472 line=0x7fffd78c9000 "#define XYZ 21", error=0x7fffd78cb0f4 <x>) at src/core/base/src/TROOT.cxx:2328 from asan/roottest/cling/other/fileClose_C.so filename=0x6070000f0fd0 "asan/roottest/cling/other/fileClose_C.so", flag=257) at /home/axel/build/llvm/llvm-project/compiler-rt/lib/asan/../sanitizer_common/sanitizer_common_interceptors.inc:6270 at src/interpreter/cling/lib/Utils/PlatformPosix.cpp:118 permanent=false, resolved=true) at src/interpreter/cling/lib/Interpreter/DynamicLibraryManager.cpp:184 at src/interpreter/cling/lib/Interpreter/Interpreter.cpp:1444 T=0x0) at src/interpreter/cling/lib/Interpreter/Interpreter.cpp:1560 at src/interpreter/cling/lib/MetaProcessor/MetaSema.cpp:57 actionResult=@0x7ffff39532b0: cling::MetaSema::AR_Success)
eguiraud
added a commit
to eguiraud/root
that referenced
this pull request
Oct 18, 2021
This tutorial crashed with the following stacktrace when run interactively. Avoiding to register a canvas with the same name multiple times fixes the crash: ``` root-project#8 0x00007f5b7876967d in TCanvas::Resize(char const*) (this=0x55e768e126c0) at ../graf2d/gpad/src/TCanvas.cxx:1740 root-project#9 0x00007f5b3e90d668 in TRootCanvas::HandleContainerConfigure(Event_t*) (this=0x55e76852b460) at ../gui/gui/src/TRootCanvas.cxx:1789 root-project#10 0x00007f5b3e8464fd in TGFrame::HandleEvent(Event_t*) (this=0x55e767938e70, event=0x7f5b79adff40) at ../gui/gui/src/TGFrame.cxx:476 root-project#11 0x00007f5b3e7f4c9a in TGClient::HandleEvent(Event_t*) (this=0x55e768de2290, event=0x7f5b79adff40) at ../gui/gui/src/TGClient.cxx:846 root-project#12 0x00007f5b3e7f531d in TGClient::ProcessOneEvent() (this=0x55e768de2290) at ../gui/gui/src/TGClient.cxx:656 root-project#13 TGClient::ProcessOneEvent() (this=0x55e768de2290) at ../gui/gui/src/TGClient.cxx:648 root-project#14 0x00007f5b3e7f536b in TGClient::HandleInput() (this=0x55e768de2290) at ../gui/gui/src/TGClient.cxx:703 root-project#15 0x00007f5b8dcb0ff8 in TUnixSystem::DispatchOneEvent(bool) (this=0x55e75ccfd080, pendingOnly=<optimized out>) at ../core/unix/src/TUnixSystem.cxx:1067 root-project#16 0x00007f5b8dbd0dca in TSystem::ProcessEvents() (this=0x55e75ccfd080) at ../core/base/src/TSystem.cxx:424 root-project#17 0x00007f5b8130600d in () root-project#18 0x00007f5b79ae0450 in () root-project#19 0x00007f5b8de5215f in WrapperCall(Cppyy::TCppMethod_t, size_t, void*, void*, void*) (method=94452242807424, nargs=0, args_=0x7f5b79ae01d7, self=0x55e75ccfd080, result=0x7f5b79ae01d7) at ../bindings/pyroot/cppyy/cppyy-backend/clingwrapper/src/clingwrapper.cxx:778 root-project#20 0x00007f5b8de527cf in CallT<unsigned char> (args=<optimized out>, nargs=<optimized out>, self=<optimized out>, method=<optimized out>) at ../bindings/pyroot/cppyy/cppyy-backend/clingwrapper/src/clingwrapper.cxx:816 root-project#21 Cppyy::CallB(long, void*, unsigned long, void*) (method=<optimized out>, self=<optimized out>, nargs=<optimized out>, args=<optimized out>) at ../bindings/pyroot/cppyy/cppyy-backend/clingwrapper/src/clingwrapper.cxx:833 root-project#22 0x00007f5b8decdc0f in GILCallB (ctxt=0x7f5b79ae0430, self=<optimized out>, method=<optimized out>) at ../bindings/pyroot/cppyy/CPyCppyy/src/Executors.cxx:69 root-project#23 CPyCppyy::(anonymous namespace)::BoolExecutor::Execute(Cppyy::TCppMethod_t, Cppyy::TCppObject_t, CPyCppyy::CallContext*) (this=<optimized out>, method=<optimized out>, self=<optimized out>, ctxt=0x7f5b79ae0430) at ../bindings/pyroot/cppyy/CPyCppyy/src/Executors.cxx:148 root-project#24 0x00007f5b8deba4c9 in CPyCppyy::CPPMethod::ExecuteFast(void*, long, CPyCppyy::CallContext*) (self=<optimized out>, offset=<optimized out>, ctxt=<optimized out>, this=<optimized out>, this=<optimized out>) at ../bindings/pyroot/cppyy/CPyCppyy/src/CPPMethod.cxx:74 root-project#25 0x00007f5b8debd3a8 in CPyCppyy::CPPMethod::ExecuteProtected(void*, long, CPyCppyy::CallContext*) (this=this entry=0x55e760617f50, self=0x55e75ccfd080, offset=0, ctxt=0x7f5b79ae0430) at ../bindings/pyroot/cppyy/CPyCppyy/src/CPPMethod.cxx:149 root-project#26 0x00007f5b8debb6fa in CPyCppyy::CPPMethod::Execute(void*, long, CPyCppyy::CallContext*) (this=this entry=0x55e760617f50, self=self entry=0x55e75ccfd080, offset=<optimized out>, ctxt=ctxt entry=0x7f5b79ae0430) at ../bindings/pyroot/cppyy/CPyCppyy/src/CPPMethod.cxx:728 root-project#27 0x00007f5b8debc46c in CPyCppyy::CPPMethod::Call(CPyCppyy::CPPInstance*&, _object*, _object*, CPyCppyy::CallContext*) (this=0x55e760617f50, self= 0x7f5b8080ef50: 0x7f5b808043c0, args=0x7f5b8e1ab040, kwds=<optimized out>, ctxt=0x7f5b79ae0430) at ../bindings/pyroot/cppyy/CPyCppyy/src/CPPMethod.cxx:783 root-project#28 0x00007f5b8dec09fe in CPyCppyy::(anonymous namespace)::mp_call(CPyCppyy::CPPOverload*, PyObject*, PyObject*) (pymeth=0x7f5b8080ef40, args=0x7f5b8e1ab040, kwds=0x0) at ../bindings/pyroot/cppyy/CPyCppyy/src/CPPOverload.cxx:566 root-project#29 0x00007f5b8e941333 in _PyObject_MakeTpCall () at /usr/lib/libpython3.9.so.1.0 root-project#30 0x00007f5b8e93d218 in _PyEval_EvalFrameDefault () at /usr/lib/libpython3.9.so.1.0 root-project#31 0x00007f5b8e936fd9 in () at /usr/lib/libpython3.9.so.1.0 root-project#32 0x00007f5b8e948b8e in _PyFunction_Vectorcall () at /usr/lib/libpython3.9.so.1.0 root-project#33 0x00007f5b8e93aec9 in _PyEval_EvalFrameDefault () at /usr/lib/libpython3.9.so.1.0 root-project#34 0x00007f5b8e94896b in _PyFunction_Vectorcall () at /usr/lib/libpython3.9.so.1.0 root-project#35 0x00007f5b8e93858e in _PyEval_EvalFrameDefault () at /usr/lib/libpython3.9.so.1.0 root-project#36 0x00007f5b8e94896b in _PyFunction_Vectorcall () at /usr/lib/libpython3.9.so.1.0 root-project#37 0x00007f5b8e93858e in _PyEval_EvalFrameDefault () at /usr/lib/libpython3.9.so.1.0 root-project#38 0x00007f5b8e94896b in _PyFunction_Vectorcall () at /usr/lib/libpython3.9.so.1.0 root-project#39 0x00007f5b8e95795b in () at /usr/lib/libpython3.9.so.1.0 root-project#40 0x00007f5b8ea3cac6 in () at /usr/lib/libpython3.9.so.1.0 root-project#41 0x00007f5b8ea17554 in () at /usr/lib/libpython3.9.so.1.0 root-project#42 0x00007f5b8e62c259 in start_thread () at /usr/lib/libpthread.so.0 root-project#43 0x00007f5b8e7425e3 in clone () at /usr/lib/libc.so.6 ```
eguiraud
added a commit
that referenced
this pull request
Oct 19, 2021
This tutorial crashed with the following stacktrace when run interactively. Avoiding to register a canvas with the same name multiple times fixes the crash: ``` #8 0x00007f5b7876967d in TCanvas::Resize(char const*) (this=0x55e768e126c0) at ../graf2d/gpad/src/TCanvas.cxx:1740 #9 0x00007f5b3e90d668 in TRootCanvas::HandleContainerConfigure(Event_t*) (this=0x55e76852b460) at ../gui/gui/src/TRootCanvas.cxx:1789 #10 0x00007f5b3e8464fd in TGFrame::HandleEvent(Event_t*) (this=0x55e767938e70, event=0x7f5b79adff40) at ../gui/gui/src/TGFrame.cxx:476 #11 0x00007f5b3e7f4c9a in TGClient::HandleEvent(Event_t*) (this=0x55e768de2290, event=0x7f5b79adff40) at ../gui/gui/src/TGClient.cxx:846 #12 0x00007f5b3e7f531d in TGClient::ProcessOneEvent() (this=0x55e768de2290) at ../gui/gui/src/TGClient.cxx:656 #13 TGClient::ProcessOneEvent() (this=0x55e768de2290) at ../gui/gui/src/TGClient.cxx:648 #14 0x00007f5b3e7f536b in TGClient::HandleInput() (this=0x55e768de2290) at ../gui/gui/src/TGClient.cxx:703 #15 0x00007f5b8dcb0ff8 in TUnixSystem::DispatchOneEvent(bool) (this=0x55e75ccfd080, pendingOnly=<optimized out>) at ../core/unix/src/TUnixSystem.cxx:1067 #16 0x00007f5b8dbd0dca in TSystem::ProcessEvents() (this=0x55e75ccfd080) at ../core/base/src/TSystem.cxx:424 #17 0x00007f5b8130600d in () #18 0x00007f5b79ae0450 in () #19 0x00007f5b8de5215f in WrapperCall(Cppyy::TCppMethod_t, size_t, void*, void*, void*) (method=94452242807424, nargs=0, args_=0x7f5b79ae01d7, self=0x55e75ccfd080, result=0x7f5b79ae01d7) at ../bindings/pyroot/cppyy/cppyy-backend/clingwrapper/src/clingwrapper.cxx:778 #20 0x00007f5b8de527cf in CallT<unsigned char> (args=<optimized out>, nargs=<optimized out>, self=<optimized out>, method=<optimized out>) at ../bindings/pyroot/cppyy/cppyy-backend/clingwrapper/src/clingwrapper.cxx:816 #21 Cppyy::CallB(long, void*, unsigned long, void*) (method=<optimized out>, self=<optimized out>, nargs=<optimized out>, args=<optimized out>) at ../bindings/pyroot/cppyy/cppyy-backend/clingwrapper/src/clingwrapper.cxx:833 #22 0x00007f5b8decdc0f in GILCallB (ctxt=0x7f5b79ae0430, self=<optimized out>, method=<optimized out>) at ../bindings/pyroot/cppyy/CPyCppyy/src/Executors.cxx:69 #23 CPyCppyy::(anonymous namespace)::BoolExecutor::Execute(Cppyy::TCppMethod_t, Cppyy::TCppObject_t, CPyCppyy::CallContext*) (this=<optimized out>, method=<optimized out>, self=<optimized out>, ctxt=0x7f5b79ae0430) at ../bindings/pyroot/cppyy/CPyCppyy/src/Executors.cxx:148 #24 0x00007f5b8deba4c9 in CPyCppyy::CPPMethod::ExecuteFast(void*, long, CPyCppyy::CallContext*) (self=<optimized out>, offset=<optimized out>, ctxt=<optimized out>, this=<optimized out>, this=<optimized out>) at ../bindings/pyroot/cppyy/CPyCppyy/src/CPPMethod.cxx:74 #25 0x00007f5b8debd3a8 in CPyCppyy::CPPMethod::ExecuteProtected(void*, long, CPyCppyy::CallContext*) (this=this entry=0x55e760617f50, self=0x55e75ccfd080, offset=0, ctxt=0x7f5b79ae0430) at ../bindings/pyroot/cppyy/CPyCppyy/src/CPPMethod.cxx:149 #26 0x00007f5b8debb6fa in CPyCppyy::CPPMethod::Execute(void*, long, CPyCppyy::CallContext*) (this=this entry=0x55e760617f50, self=self entry=0x55e75ccfd080, offset=<optimized out>, ctxt=ctxt entry=0x7f5b79ae0430) at ../bindings/pyroot/cppyy/CPyCppyy/src/CPPMethod.cxx:728 #27 0x00007f5b8debc46c in CPyCppyy::CPPMethod::Call(CPyCppyy::CPPInstance*&, _object*, _object*, CPyCppyy::CallContext*) (this=0x55e760617f50, self= 0x7f5b8080ef50: 0x7f5b808043c0, args=0x7f5b8e1ab040, kwds=<optimized out>, ctxt=0x7f5b79ae0430) at ../bindings/pyroot/cppyy/CPyCppyy/src/CPPMethod.cxx:783 #28 0x00007f5b8dec09fe in CPyCppyy::(anonymous namespace)::mp_call(CPyCppyy::CPPOverload*, PyObject*, PyObject*) (pymeth=0x7f5b8080ef40, args=0x7f5b8e1ab040, kwds=0x0) at ../bindings/pyroot/cppyy/CPyCppyy/src/CPPOverload.cxx:566 #29 0x00007f5b8e941333 in _PyObject_MakeTpCall () at /usr/lib/libpython3.9.so.1.0 #30 0x00007f5b8e93d218 in _PyEval_EvalFrameDefault () at /usr/lib/libpython3.9.so.1.0 #31 0x00007f5b8e936fd9 in () at /usr/lib/libpython3.9.so.1.0 #32 0x00007f5b8e948b8e in _PyFunction_Vectorcall () at /usr/lib/libpython3.9.so.1.0 #33 0x00007f5b8e93aec9 in _PyEval_EvalFrameDefault () at /usr/lib/libpython3.9.so.1.0 #34 0x00007f5b8e94896b in _PyFunction_Vectorcall () at /usr/lib/libpython3.9.so.1.0 #35 0x00007f5b8e93858e in _PyEval_EvalFrameDefault () at /usr/lib/libpython3.9.so.1.0 #36 0x00007f5b8e94896b in _PyFunction_Vectorcall () at /usr/lib/libpython3.9.so.1.0 #37 0x00007f5b8e93858e in _PyEval_EvalFrameDefault () at /usr/lib/libpython3.9.so.1.0 #38 0x00007f5b8e94896b in _PyFunction_Vectorcall () at /usr/lib/libpython3.9.so.1.0 #39 0x00007f5b8e95795b in () at /usr/lib/libpython3.9.so.1.0 #40 0x00007f5b8ea3cac6 in () at /usr/lib/libpython3.9.so.1.0 #41 0x00007f5b8ea17554 in () at /usr/lib/libpython3.9.so.1.0 #42 0x00007f5b8e62c259 in start_thread () at /usr/lib/libpthread.so.0 #43 0x00007f5b8e7425e3 in clone () at /usr/lib/libc.so.6 ```
scott-snyder
pushed a commit
to scott-snyder/root
that referenced
this pull request
Dec 6, 2021
With gcc12 headers, i see a cling failure. In dbg: [sss@karma dvtest]$ genreflex x.h --selection_file=sel.xml -o x_gen.cxx -Ixheaders 2>&1|tee log genreflex: /home/sss/root/root-6.24.06/src/root/interpreter/llvm/src/tools/clang/include/clang/AST/TemplateBase.h:257: clang::QualType clang::TemplateArgument::getAsType() const: Assertion `getKind() == Type && "Unexpected kind"' failed. #0 0x00007f4124e1bac2 llvm::sys::PrintStackTrace(llvm::raw_ostream&) /home/sss/root/root-6.24.06/src/root/interpreter/llvm/src/lib/Support/Unix/Signals.inc:533:22 root-project#1 0x00007f4124e1bb5e PrintStackTraceSignalHandler(void*) /home/sss/root/root-6.24.06/src/root/interpreter/llvm/src/lib/Support/Unix/Signals.inc:594:1 root-project#2 0x00007f4124e19bd7 llvm::sys::RunSignalHandlers() /home/sss/root/root-6.24.06/src/root/interpreter/llvm/src/lib/Support/Signals.cpp:68:20 root-project#3 0x00007f4124e1b53c SignalHandler(int) /home/sss/root/root-6.24.06/src/root/interpreter/llvm/src/lib/Support/Unix/Signals.inc:385:1 root-project#4 0x00007f411fc77a20 __restore_rt (/lib64/libpthread.so.0+0x13a20) root-project#5 0x00007f411f7502a2 raise (/lib64/libc.so.6+0x3d2a2) root-project#6 0x00007f411f7398a4 abort (/lib64/libc.so.6+0x268a4) root-project#7 0x00007f411f739789 _nl_load_domain.cold (/lib64/libc.so.6+0x26789) root-project#8 0x00007f411f748a16 (/lib64/libc.so.6+0x35a16) root-project#9 0x00007f4120a43c9d clang::TemplateArgument::getAsType() const /home/sss/root/root-6.24.06/src/root/interpreter/llvm/src/tools/clang/include/clang/AST/TemplateBase.h:257:5 root-project#10 0x00007f4120a57b3f ROOT::TMetaUtils::ReSubstTemplateArg(clang::QualType, clang::Type const*) (.localalias) /home/sss/root/root-6.24.06/src/root/core/clingutils/src/TClingUtils.cxx:4752:49 root-project#11 0x00007f4120a57c5b ROOT::TMetaUtils::ReSubstTemplateArg(clang::QualType, clang::Type const*) (.localalias) /home/sss/root/root-6.24.06/src/root/core/clingutils/src/TClingUtils.cxx:4775:58 root-project#12 0x00007f4120d05fd7 TClingBaseClassInfo::InternalNext(int) /home/sss/root/root-6.24.06/src/root/core/metacling/src/TClingBaseClassInfo.cxx:341:67 root-project#13 0x00007f4120d06098 TClingBaseClassInfo::Next(int) /home/sss/root/root-6.24.06/src/root/core/metacling/src/TClingBaseClassInfo.cxx:351:1 root-project#14 0x00007f4120d060b7 TClingBaseClassInfo::Next() /home/sss/root/root-6.24.06/src/root/core/metacling/src/TClingBaseClassInfo.cxx:356:1 root-project#15 0x00007f4120bc82c1 TCling::CreateListOfBaseClasses(TClass*) const /home/sss/root/root-6.24.06/src/root/core/metacling/src/TCling.cxx:4267:17 root-project#16 0x00007f41200c4aa1 TClass::GetListOfBases() /home/sss/root/root-6.24.06/src/root/core/meta/src/TClass.cxx:3649:4 root-project#17 0x00007f41200c166a TClass::GetBaseClass(TClass const*) (.localalias) /home/sss/root/root-6.24.06/src/root/core/meta/src/TClass.cxx:2659:37 root-project#18 0x00007f41200c16f2 TClass::GetBaseClass(TClass const*) (.localalias) /home/sss/root/root-6.24.06/src/root/core/meta/src/TClass.cxx:2668:30 root-project#19 0x00007f41200c8cfe TClass::InheritsFrom(TClass const*) const /home/sss/root/root-6.24.06/src/root/core/meta/src/TClass.cxx:4889:38 root-project#20 0x00007f41200ccc8b TClass::Property() const /home/sss/root/root-6.24.06/src/root/core/meta/src/TClass.cxx:6054:4 root-project#21 0x00007f41200d0a69 TClass::IsClassStructOrUnion() const /home/sss/root/root-6.24.06/src/root/core/meta/inc/TClass.h:352:58 root-project#22 0x00007f41200c5141 TClass::GetListOfDataMembers(bool) /home/sss/root/root-6.24.06/src/root/core/meta/src/TClass.cxx:3757:4 root-project#23 0x00007f412927255a CloseStreamerInfoROOTFile /home/sss/root/root-6.24.06/src/root/io/rootpcm/src/rootclingIO.cxx:162:42 root-project#24 0x00007f4120b2fc66 FinalizeStreamerInfoWriting(cling::Interpreter&, bool) /home/sss/root/root-6.24.06/src/root/core/dictgen/src/rootcling_impl.cxx:2627:8 root-project#25 0x00007f4120b3054e GenerateFullDict(std::ostream&, cling::Interpreter&, RScanner&, std::__cxx11::list<ROOT::TMetaUtils::RConstructorType, std::allocator<ROOT::TMetaUtils::RConstructorType> > const&, bool, bool, bool) /home/sss/root/root-6.24.06/src/root/core/dictgen/src/rootcling_impl.cxx:2769:51 root-project#26 0x00007f4120b3cec9 RootClingMain(int, char**, bool) /home/sss/root/root-6.24.06/src/root/core/dictgen/src/rootcling_impl.cxx:4861:43 root-project#27 0x00007f4120b40825 genreflex::invokeRootCling(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool, bool, bool, bool, bool, bool, bool, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, bool, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) /home/sss/root/root-6.24.06/src/root/core/dictgen/src/rootcling_impl.cxx:5326:46 root-project#28 0x00007f4120b426f6 GenReflexMain(int, char**) /home/sss/root/root-6.24.06/src/root/core/dictgen/src/rootcling_impl.cxx:6026:36 root-project#29 0x00007f4120b42b8d ROOT_rootcling_Driver /home/sss/root/root-6.24.06/src/root/core/dictgen/src/rootcling_impl.cxx:6097:29 root-project#30 0x0000000000401259 main /home/sss/root/root-6.24.06/src/root/main/src/rootcling.cxx:43:51 root-project#31 0x00007f411f73ab75 __libc_start_main (/lib64/libc.so.6+0x27b75) root-project#32 0x000000000040110e _start (/home/sss/root/root-6.24.06/rootsys/bin/genreflex+0x40110e) Stack dump: 0. Program arguments: rootcling -v2 -f x_gen.cxx -inlineInputHeader -Ixheaders x.h sel.xml sel.xml: <lcgdict> <class pattern="*iterator<*pair<const*,const*"/> </lcgdict> x.h: #include <string> #include <map> void foo (std::map<unsigned, std::string>& m, const std::string& s) { m.emplace (0, s); } or: #include <string> template <class T> struct tree_iterator {}; using value_type = std::pair<const unsigned, std::string>; using xiterator = tree_iterator<value_type>; class xtree { public: std::pair<xiterator, bool> emplace() { return std::pair<xiterator, bool>(xiterator(), false); } }; Difficult to reduce it further due to how rootcling implicitly reads headers.
scott-snyder
pushed a commit
to scott-snyder/root
that referenced
this pull request
Dec 6, 2021
With gcc12 headers, i see a cling failure. In dbg: [sss@karma dvtest]$ genreflex x.h --selection_file=sel.xml -o x_gen.cxx -Ixheaders 2>&1|tee log genreflex: /home/sss/root/root-6.24.06/src/root/interpreter/llvm/src/tools/clang/include/clang/AST/TemplateBase.h:257: clang::QualType clang::TemplateArgument::getAsType() const: Assertion `getKind() == Type && "Unexpected kind"' failed. #0 0x00007f4124e1bac2 llvm::sys::PrintStackTrace(llvm::raw_ostream&) /home/sss/root/root-6.24.06/src/root/interpreter/llvm/src/lib/Support/Unix/Signals.inc:533:22 root-project#1 0x00007f4124e1bb5e PrintStackTraceSignalHandler(void*) /home/sss/root/root-6.24.06/src/root/interpreter/llvm/src/lib/Support/Unix/Signals.inc:594:1 root-project#2 0x00007f4124e19bd7 llvm::sys::RunSignalHandlers() /home/sss/root/root-6.24.06/src/root/interpreter/llvm/src/lib/Support/Signals.cpp:68:20 root-project#3 0x00007f4124e1b53c SignalHandler(int) /home/sss/root/root-6.24.06/src/root/interpreter/llvm/src/lib/Support/Unix/Signals.inc:385:1 root-project#4 0x00007f411fc77a20 __restore_rt (/lib64/libpthread.so.0+0x13a20) root-project#5 0x00007f411f7502a2 raise (/lib64/libc.so.6+0x3d2a2) root-project#6 0x00007f411f7398a4 abort (/lib64/libc.so.6+0x268a4) root-project#7 0x00007f411f739789 _nl_load_domain.cold (/lib64/libc.so.6+0x26789) root-project#8 0x00007f411f748a16 (/lib64/libc.so.6+0x35a16) root-project#9 0x00007f4120a43c9d clang::TemplateArgument::getAsType() const /home/sss/root/root-6.24.06/src/root/interpreter/llvm/src/tools/clang/include/clang/AST/TemplateBase.h:257:5 root-project#10 0x00007f4120a57b3f ROOT::TMetaUtils::ReSubstTemplateArg(clang::QualType, clang::Type const*) (.localalias) /home/sss/root/root-6.24.06/src/root/core/clingutils/src/TClingUtils.cxx:4752:49 root-project#11 0x00007f4120a57c5b ROOT::TMetaUtils::ReSubstTemplateArg(clang::QualType, clang::Type const*) (.localalias) /home/sss/root/root-6.24.06/src/root/core/clingutils/src/TClingUtils.cxx:4775:58 root-project#12 0x00007f4120d05fd7 TClingBaseClassInfo::InternalNext(int) /home/sss/root/root-6.24.06/src/root/core/metacling/src/TClingBaseClassInfo.cxx:341:67 root-project#13 0x00007f4120d06098 TClingBaseClassInfo::Next(int) /home/sss/root/root-6.24.06/src/root/core/metacling/src/TClingBaseClassInfo.cxx:351:1 root-project#14 0x00007f4120d060b7 TClingBaseClassInfo::Next() /home/sss/root/root-6.24.06/src/root/core/metacling/src/TClingBaseClassInfo.cxx:356:1 root-project#15 0x00007f4120bc82c1 TCling::CreateListOfBaseClasses(TClass*) const /home/sss/root/root-6.24.06/src/root/core/metacling/src/TCling.cxx:4267:17 root-project#16 0x00007f41200c4aa1 TClass::GetListOfBases() /home/sss/root/root-6.24.06/src/root/core/meta/src/TClass.cxx:3649:4 root-project#17 0x00007f41200c166a TClass::GetBaseClass(TClass const*) (.localalias) /home/sss/root/root-6.24.06/src/root/core/meta/src/TClass.cxx:2659:37 root-project#18 0x00007f41200c16f2 TClass::GetBaseClass(TClass const*) (.localalias) /home/sss/root/root-6.24.06/src/root/core/meta/src/TClass.cxx:2668:30 root-project#19 0x00007f41200c8cfe TClass::InheritsFrom(TClass const*) const /home/sss/root/root-6.24.06/src/root/core/meta/src/TClass.cxx:4889:38 root-project#20 0x00007f41200ccc8b TClass::Property() const /home/sss/root/root-6.24.06/src/root/core/meta/src/TClass.cxx:6054:4 root-project#21 0x00007f41200d0a69 TClass::IsClassStructOrUnion() const /home/sss/root/root-6.24.06/src/root/core/meta/inc/TClass.h:352:58 root-project#22 0x00007f41200c5141 TClass::GetListOfDataMembers(bool) /home/sss/root/root-6.24.06/src/root/core/meta/src/TClass.cxx:3757:4 root-project#23 0x00007f412927255a CloseStreamerInfoROOTFile /home/sss/root/root-6.24.06/src/root/io/rootpcm/src/rootclingIO.cxx:162:42 root-project#24 0x00007f4120b2fc66 FinalizeStreamerInfoWriting(cling::Interpreter&, bool) /home/sss/root/root-6.24.06/src/root/core/dictgen/src/rootcling_impl.cxx:2627:8 root-project#25 0x00007f4120b3054e GenerateFullDict(std::ostream&, cling::Interpreter&, RScanner&, std::__cxx11::list<ROOT::TMetaUtils::RConstructorType, std::allocator<ROOT::TMetaUtils::RConstructorType> > const&, bool, bool, bool) /home/sss/root/root-6.24.06/src/root/core/dictgen/src/rootcling_impl.cxx:2769:51 root-project#26 0x00007f4120b3cec9 RootClingMain(int, char**, bool) /home/sss/root/root-6.24.06/src/root/core/dictgen/src/rootcling_impl.cxx:4861:43 root-project#27 0x00007f4120b40825 genreflex::invokeRootCling(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool, bool, bool, bool, bool, bool, bool, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, bool, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) /home/sss/root/root-6.24.06/src/root/core/dictgen/src/rootcling_impl.cxx:5326:46 root-project#28 0x00007f4120b426f6 GenReflexMain(int, char**) /home/sss/root/root-6.24.06/src/root/core/dictgen/src/rootcling_impl.cxx:6026:36 root-project#29 0x00007f4120b42b8d ROOT_rootcling_Driver /home/sss/root/root-6.24.06/src/root/core/dictgen/src/rootcling_impl.cxx:6097:29 root-project#30 0x0000000000401259 main /home/sss/root/root-6.24.06/src/root/main/src/rootcling.cxx:43:51 root-project#31 0x00007f411f73ab75 __libc_start_main (/lib64/libc.so.6+0x27b75) root-project#32 0x000000000040110e _start (/home/sss/root/root-6.24.06/rootsys/bin/genreflex+0x40110e) Stack dump: 0. Program arguments: rootcling -v2 -f x_gen.cxx -inlineInputHeader -Ixheaders x.h sel.xml sel.xml: <lcgdict> <class pattern="*iterator<*pair<const*,const*"/> </lcgdict> x.h: #include <string> #include <map> void foo (std::map<unsigned, std::string>& m, const std::string& s) { m.emplace (0, s); } or: #include <string> template <class T> struct tree_iterator {}; using value_type = std::pair<const unsigned, std::string>; using xiterator = tree_iterator<value_type>; class xtree { public: std::pair<xiterator, bool> emplace() { return std::pair<xiterator, bool>(xiterator(), false); } }; Difficult to reduce it further due to how rootcling implicitly reads headers.
scott-snyder
pushed a commit
to scott-snyder/root
that referenced
this pull request
Apr 3, 2022
With gcc12 headers, i see a cling failure. In dbg: [sss@karma dvtest]$ genreflex x.h --selection_file=sel.xml -o x_gen.cxx -Ixheaders 2>&1|tee log genreflex: /home/sss/root/root-6.24.06/src/root/interpreter/llvm/src/tools/clang/include/clang/AST/TemplateBase.h:257: clang::QualType clang::TemplateArgument::getAsType() const: Assertion `getKind() == Type && "Unexpected kind"' failed. #0 0x00007f4124e1bac2 llvm::sys::PrintStackTrace(llvm::raw_ostream&) /home/sss/root/root-6.24.06/src/root/interpreter/llvm/src/lib/Support/Unix/Signals.inc:533:22 root-project#1 0x00007f4124e1bb5e PrintStackTraceSignalHandler(void*) /home/sss/root/root-6.24.06/src/root/interpreter/llvm/src/lib/Support/Unix/Signals.inc:594:1 root-project#2 0x00007f4124e19bd7 llvm::sys::RunSignalHandlers() /home/sss/root/root-6.24.06/src/root/interpreter/llvm/src/lib/Support/Signals.cpp:68:20 root-project#3 0x00007f4124e1b53c SignalHandler(int) /home/sss/root/root-6.24.06/src/root/interpreter/llvm/src/lib/Support/Unix/Signals.inc:385:1 root-project#4 0x00007f411fc77a20 __restore_rt (/lib64/libpthread.so.0+0x13a20) root-project#5 0x00007f411f7502a2 raise (/lib64/libc.so.6+0x3d2a2) root-project#6 0x00007f411f7398a4 abort (/lib64/libc.so.6+0x268a4) root-project#7 0x00007f411f739789 _nl_load_domain.cold (/lib64/libc.so.6+0x26789) root-project#8 0x00007f411f748a16 (/lib64/libc.so.6+0x35a16) root-project#9 0x00007f4120a43c9d clang::TemplateArgument::getAsType() const /home/sss/root/root-6.24.06/src/root/interpreter/llvm/src/tools/clang/include/clang/AST/TemplateBase.h:257:5 root-project#10 0x00007f4120a57b3f ROOT::TMetaUtils::ReSubstTemplateArg(clang::QualType, clang::Type const*) (.localalias) /home/sss/root/root-6.24.06/src/root/core/clingutils/src/TClingUtils.cxx:4752:49 root-project#11 0x00007f4120a57c5b ROOT::TMetaUtils::ReSubstTemplateArg(clang::QualType, clang::Type const*) (.localalias) /home/sss/root/root-6.24.06/src/root/core/clingutils/src/TClingUtils.cxx:4775:58 root-project#12 0x00007f4120d05fd7 TClingBaseClassInfo::InternalNext(int) /home/sss/root/root-6.24.06/src/root/core/metacling/src/TClingBaseClassInfo.cxx:341:67 root-project#13 0x00007f4120d06098 TClingBaseClassInfo::Next(int) /home/sss/root/root-6.24.06/src/root/core/metacling/src/TClingBaseClassInfo.cxx:351:1 root-project#14 0x00007f4120d060b7 TClingBaseClassInfo::Next() /home/sss/root/root-6.24.06/src/root/core/metacling/src/TClingBaseClassInfo.cxx:356:1 root-project#15 0x00007f4120bc82c1 TCling::CreateListOfBaseClasses(TClass*) const /home/sss/root/root-6.24.06/src/root/core/metacling/src/TCling.cxx:4267:17 root-project#16 0x00007f41200c4aa1 TClass::GetListOfBases() /home/sss/root/root-6.24.06/src/root/core/meta/src/TClass.cxx:3649:4 root-project#17 0x00007f41200c166a TClass::GetBaseClass(TClass const*) (.localalias) /home/sss/root/root-6.24.06/src/root/core/meta/src/TClass.cxx:2659:37 root-project#18 0x00007f41200c16f2 TClass::GetBaseClass(TClass const*) (.localalias) /home/sss/root/root-6.24.06/src/root/core/meta/src/TClass.cxx:2668:30 root-project#19 0x00007f41200c8cfe TClass::InheritsFrom(TClass const*) const /home/sss/root/root-6.24.06/src/root/core/meta/src/TClass.cxx:4889:38 root-project#20 0x00007f41200ccc8b TClass::Property() const /home/sss/root/root-6.24.06/src/root/core/meta/src/TClass.cxx:6054:4 root-project#21 0x00007f41200d0a69 TClass::IsClassStructOrUnion() const /home/sss/root/root-6.24.06/src/root/core/meta/inc/TClass.h:352:58 root-project#22 0x00007f41200c5141 TClass::GetListOfDataMembers(bool) /home/sss/root/root-6.24.06/src/root/core/meta/src/TClass.cxx:3757:4 root-project#23 0x00007f412927255a CloseStreamerInfoROOTFile /home/sss/root/root-6.24.06/src/root/io/rootpcm/src/rootclingIO.cxx:162:42 root-project#24 0x00007f4120b2fc66 FinalizeStreamerInfoWriting(cling::Interpreter&, bool) /home/sss/root/root-6.24.06/src/root/core/dictgen/src/rootcling_impl.cxx:2627:8 root-project#25 0x00007f4120b3054e GenerateFullDict(std::ostream&, cling::Interpreter&, RScanner&, std::__cxx11::list<ROOT::TMetaUtils::RConstructorType, std::allocator<ROOT::TMetaUtils::RConstructorType> > const&, bool, bool, bool) /home/sss/root/root-6.24.06/src/root/core/dictgen/src/rootcling_impl.cxx:2769:51 root-project#26 0x00007f4120b3cec9 RootClingMain(int, char**, bool) /home/sss/root/root-6.24.06/src/root/core/dictgen/src/rootcling_impl.cxx:4861:43 root-project#27 0x00007f4120b40825 genreflex::invokeRootCling(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool, bool, bool, bool, bool, bool, bool, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, bool, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) /home/sss/root/root-6.24.06/src/root/core/dictgen/src/rootcling_impl.cxx:5326:46 root-project#28 0x00007f4120b426f6 GenReflexMain(int, char**) /home/sss/root/root-6.24.06/src/root/core/dictgen/src/rootcling_impl.cxx:6026:36 root-project#29 0x00007f4120b42b8d ROOT_rootcling_Driver /home/sss/root/root-6.24.06/src/root/core/dictgen/src/rootcling_impl.cxx:6097:29 root-project#30 0x0000000000401259 main /home/sss/root/root-6.24.06/src/root/main/src/rootcling.cxx:43:51 root-project#31 0x00007f411f73ab75 __libc_start_main (/lib64/libc.so.6+0x27b75) root-project#32 0x000000000040110e _start (/home/sss/root/root-6.24.06/rootsys/bin/genreflex+0x40110e) Stack dump: 0. Program arguments: rootcling -v2 -f x_gen.cxx -inlineInputHeader -Ixheaders x.h sel.xml sel.xml: <lcgdict> <class pattern="*iterator<*pair<const*,const*"/> </lcgdict> x.h: #include <string> #include <map> void foo (std::map<unsigned, std::string>& m, const std::string& s) { m.emplace (0, s); } or: #include <string> template <class T> struct tree_iterator {}; using value_type = std::pair<const unsigned, std::string>; using xiterator = tree_iterator<value_type>; class xtree { public: std::pair<xiterator, bool> emplace() { return std::pair<xiterator, bool>(xiterator(), false); } }; Difficult to reduce it further due to how rootcling implicitly reads headers.
Closed
scott-snyder
pushed a commit
to scott-snyder/root
that referenced
this pull request
Jun 2, 2022
With gcc12 headers, i see a cling failure. In dbg: [sss@karma dvtest]$ genreflex x.h --selection_file=sel.xml -o x_gen.cxx -Ixheaders 2>&1|tee log genreflex: /home/sss/root/root-6.24.06/src/root/interpreter/llvm/src/tools/clang/include/clang/AST/TemplateBase.h:257: clang::QualType clang::TemplateArgument::getAsType() const: Assertion `getKind() == Type && "Unexpected kind"' failed. #0 0x00007f4124e1bac2 llvm::sys::PrintStackTrace(llvm::raw_ostream&) /home/sss/root/root-6.24.06/src/root/interpreter/llvm/src/lib/Support/Unix/Signals.inc:533:22 root-project#1 0x00007f4124e1bb5e PrintStackTraceSignalHandler(void*) /home/sss/root/root-6.24.06/src/root/interpreter/llvm/src/lib/Support/Unix/Signals.inc:594:1 root-project#2 0x00007f4124e19bd7 llvm::sys::RunSignalHandlers() /home/sss/root/root-6.24.06/src/root/interpreter/llvm/src/lib/Support/Signals.cpp:68:20 root-project#3 0x00007f4124e1b53c SignalHandler(int) /home/sss/root/root-6.24.06/src/root/interpreter/llvm/src/lib/Support/Unix/Signals.inc:385:1 root-project#4 0x00007f411fc77a20 __restore_rt (/lib64/libpthread.so.0+0x13a20) root-project#5 0x00007f411f7502a2 raise (/lib64/libc.so.6+0x3d2a2) root-project#6 0x00007f411f7398a4 abort (/lib64/libc.so.6+0x268a4) root-project#7 0x00007f411f739789 _nl_load_domain.cold (/lib64/libc.so.6+0x26789) root-project#8 0x00007f411f748a16 (/lib64/libc.so.6+0x35a16) root-project#9 0x00007f4120a43c9d clang::TemplateArgument::getAsType() const /home/sss/root/root-6.24.06/src/root/interpreter/llvm/src/tools/clang/include/clang/AST/TemplateBase.h:257:5 root-project#10 0x00007f4120a57b3f ROOT::TMetaUtils::ReSubstTemplateArg(clang::QualType, clang::Type const*) (.localalias) /home/sss/root/root-6.24.06/src/root/core/clingutils/src/TClingUtils.cxx:4752:49 root-project#11 0x00007f4120a57c5b ROOT::TMetaUtils::ReSubstTemplateArg(clang::QualType, clang::Type const*) (.localalias) /home/sss/root/root-6.24.06/src/root/core/clingutils/src/TClingUtils.cxx:4775:58 root-project#12 0x00007f4120d05fd7 TClingBaseClassInfo::InternalNext(int) /home/sss/root/root-6.24.06/src/root/core/metacling/src/TClingBaseClassInfo.cxx:341:67 root-project#13 0x00007f4120d06098 TClingBaseClassInfo::Next(int) /home/sss/root/root-6.24.06/src/root/core/metacling/src/TClingBaseClassInfo.cxx:351:1 root-project#14 0x00007f4120d060b7 TClingBaseClassInfo::Next() /home/sss/root/root-6.24.06/src/root/core/metacling/src/TClingBaseClassInfo.cxx:356:1 root-project#15 0x00007f4120bc82c1 TCling::CreateListOfBaseClasses(TClass*) const /home/sss/root/root-6.24.06/src/root/core/metacling/src/TCling.cxx:4267:17 root-project#16 0x00007f41200c4aa1 TClass::GetListOfBases() /home/sss/root/root-6.24.06/src/root/core/meta/src/TClass.cxx:3649:4 root-project#17 0x00007f41200c166a TClass::GetBaseClass(TClass const*) (.localalias) /home/sss/root/root-6.24.06/src/root/core/meta/src/TClass.cxx:2659:37 root-project#18 0x00007f41200c16f2 TClass::GetBaseClass(TClass const*) (.localalias) /home/sss/root/root-6.24.06/src/root/core/meta/src/TClass.cxx:2668:30 root-project#19 0x00007f41200c8cfe TClass::InheritsFrom(TClass const*) const /home/sss/root/root-6.24.06/src/root/core/meta/src/TClass.cxx:4889:38 root-project#20 0x00007f41200ccc8b TClass::Property() const /home/sss/root/root-6.24.06/src/root/core/meta/src/TClass.cxx:6054:4 root-project#21 0x00007f41200d0a69 TClass::IsClassStructOrUnion() const /home/sss/root/root-6.24.06/src/root/core/meta/inc/TClass.h:352:58 root-project#22 0x00007f41200c5141 TClass::GetListOfDataMembers(bool) /home/sss/root/root-6.24.06/src/root/core/meta/src/TClass.cxx:3757:4 root-project#23 0x00007f412927255a CloseStreamerInfoROOTFile /home/sss/root/root-6.24.06/src/root/io/rootpcm/src/rootclingIO.cxx:162:42 root-project#24 0x00007f4120b2fc66 FinalizeStreamerInfoWriting(cling::Interpreter&, bool) /home/sss/root/root-6.24.06/src/root/core/dictgen/src/rootcling_impl.cxx:2627:8 root-project#25 0x00007f4120b3054e GenerateFullDict(std::ostream&, cling::Interpreter&, RScanner&, std::__cxx11::list<ROOT::TMetaUtils::RConstructorType, std::allocator<ROOT::TMetaUtils::RConstructorType> > const&, bool, bool, bool) /home/sss/root/root-6.24.06/src/root/core/dictgen/src/rootcling_impl.cxx:2769:51 root-project#26 0x00007f4120b3cec9 RootClingMain(int, char**, bool) /home/sss/root/root-6.24.06/src/root/core/dictgen/src/rootcling_impl.cxx:4861:43 root-project#27 0x00007f4120b40825 genreflex::invokeRootCling(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool, bool, bool, bool, bool, bool, bool, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, bool, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) /home/sss/root/root-6.24.06/src/root/core/dictgen/src/rootcling_impl.cxx:5326:46 root-project#28 0x00007f4120b426f6 GenReflexMain(int, char**) /home/sss/root/root-6.24.06/src/root/core/dictgen/src/rootcling_impl.cxx:6026:36 root-project#29 0x00007f4120b42b8d ROOT_rootcling_Driver /home/sss/root/root-6.24.06/src/root/core/dictgen/src/rootcling_impl.cxx:6097:29 root-project#30 0x0000000000401259 main /home/sss/root/root-6.24.06/src/root/main/src/rootcling.cxx:43:51 root-project#31 0x00007f411f73ab75 __libc_start_main (/lib64/libc.so.6+0x27b75) root-project#32 0x000000000040110e _start (/home/sss/root/root-6.24.06/rootsys/bin/genreflex+0x40110e) Stack dump: 0. Program arguments: rootcling -v2 -f x_gen.cxx -inlineInputHeader -Ixheaders x.h sel.xml sel.xml: <lcgdict> <class pattern="*iterator<*pair<const*,const*"/> </lcgdict> x.h: #include <string> #include <map> void foo (std::map<unsigned, std::string>& m, const std::string& s) { m.emplace (0, s); } or: #include <string> template <class T> struct tree_iterator {}; using value_type = std::pair<const unsigned, std::string>; using xiterator = tree_iterator<value_type>; class xtree { public: std::pair<xiterator, bool> emplace() { return std::pair<xiterator, bool>(xiterator(), false); } }; Difficult to reduce it further due to how rootcling implicitly reads headers.
scott-snyder
pushed a commit
to scott-snyder/root
that referenced
this pull request
Jun 3, 2022
With gcc12 headers, i see a cling failure. In dbg: [sss@karma dvtest]$ genreflex x.h --selection_file=sel.xml -o x_gen.cxx -Ixheaders 2>&1|tee log genreflex: /home/sss/root/root-6.24.06/src/root/interpreter/llvm/src/tools/clang/include/clang/AST/TemplateBase.h:257: clang::QualType clang::TemplateArgument::getAsType() const: Assertion `getKind() == Type && "Unexpected kind"' failed. #0 0x00007f4124e1bac2 llvm::sys::PrintStackTrace(llvm::raw_ostream&) /home/sss/root/root-6.24.06/src/root/interpreter/llvm/src/lib/Support/Unix/Signals.inc:533:22 root-project#1 0x00007f4124e1bb5e PrintStackTraceSignalHandler(void*) /home/sss/root/root-6.24.06/src/root/interpreter/llvm/src/lib/Support/Unix/Signals.inc:594:1 root-project#2 0x00007f4124e19bd7 llvm::sys::RunSignalHandlers() /home/sss/root/root-6.24.06/src/root/interpreter/llvm/src/lib/Support/Signals.cpp:68:20 root-project#3 0x00007f4124e1b53c SignalHandler(int) /home/sss/root/root-6.24.06/src/root/interpreter/llvm/src/lib/Support/Unix/Signals.inc:385:1 root-project#4 0x00007f411fc77a20 __restore_rt (/lib64/libpthread.so.0+0x13a20) root-project#5 0x00007f411f7502a2 raise (/lib64/libc.so.6+0x3d2a2) root-project#6 0x00007f411f7398a4 abort (/lib64/libc.so.6+0x268a4) root-project#7 0x00007f411f739789 _nl_load_domain.cold (/lib64/libc.so.6+0x26789) root-project#8 0x00007f411f748a16 (/lib64/libc.so.6+0x35a16) root-project#9 0x00007f4120a43c9d clang::TemplateArgument::getAsType() const /home/sss/root/root-6.24.06/src/root/interpreter/llvm/src/tools/clang/include/clang/AST/TemplateBase.h:257:5 root-project#10 0x00007f4120a57b3f ROOT::TMetaUtils::ReSubstTemplateArg(clang::QualType, clang::Type const*) (.localalias) /home/sss/root/root-6.24.06/src/root/core/clingutils/src/TClingUtils.cxx:4752:49 root-project#11 0x00007f4120a57c5b ROOT::TMetaUtils::ReSubstTemplateArg(clang::QualType, clang::Type const*) (.localalias) /home/sss/root/root-6.24.06/src/root/core/clingutils/src/TClingUtils.cxx:4775:58 root-project#12 0x00007f4120d05fd7 TClingBaseClassInfo::InternalNext(int) /home/sss/root/root-6.24.06/src/root/core/metacling/src/TClingBaseClassInfo.cxx:341:67 root-project#13 0x00007f4120d06098 TClingBaseClassInfo::Next(int) /home/sss/root/root-6.24.06/src/root/core/metacling/src/TClingBaseClassInfo.cxx:351:1 root-project#14 0x00007f4120d060b7 TClingBaseClassInfo::Next() /home/sss/root/root-6.24.06/src/root/core/metacling/src/TClingBaseClassInfo.cxx:356:1 root-project#15 0x00007f4120bc82c1 TCling::CreateListOfBaseClasses(TClass*) const /home/sss/root/root-6.24.06/src/root/core/metacling/src/TCling.cxx:4267:17 root-project#16 0x00007f41200c4aa1 TClass::GetListOfBases() /home/sss/root/root-6.24.06/src/root/core/meta/src/TClass.cxx:3649:4 root-project#17 0x00007f41200c166a TClass::GetBaseClass(TClass const*) (.localalias) /home/sss/root/root-6.24.06/src/root/core/meta/src/TClass.cxx:2659:37 root-project#18 0x00007f41200c16f2 TClass::GetBaseClass(TClass const*) (.localalias) /home/sss/root/root-6.24.06/src/root/core/meta/src/TClass.cxx:2668:30 root-project#19 0x00007f41200c8cfe TClass::InheritsFrom(TClass const*) const /home/sss/root/root-6.24.06/src/root/core/meta/src/TClass.cxx:4889:38 root-project#20 0x00007f41200ccc8b TClass::Property() const /home/sss/root/root-6.24.06/src/root/core/meta/src/TClass.cxx:6054:4 root-project#21 0x00007f41200d0a69 TClass::IsClassStructOrUnion() const /home/sss/root/root-6.24.06/src/root/core/meta/inc/TClass.h:352:58 root-project#22 0x00007f41200c5141 TClass::GetListOfDataMembers(bool) /home/sss/root/root-6.24.06/src/root/core/meta/src/TClass.cxx:3757:4 root-project#23 0x00007f412927255a CloseStreamerInfoROOTFile /home/sss/root/root-6.24.06/src/root/io/rootpcm/src/rootclingIO.cxx:162:42 root-project#24 0x00007f4120b2fc66 FinalizeStreamerInfoWriting(cling::Interpreter&, bool) /home/sss/root/root-6.24.06/src/root/core/dictgen/src/rootcling_impl.cxx:2627:8 root-project#25 0x00007f4120b3054e GenerateFullDict(std::ostream&, cling::Interpreter&, RScanner&, std::__cxx11::list<ROOT::TMetaUtils::RConstructorType, std::allocator<ROOT::TMetaUtils::RConstructorType> > const&, bool, bool, bool) /home/sss/root/root-6.24.06/src/root/core/dictgen/src/rootcling_impl.cxx:2769:51 root-project#26 0x00007f4120b3cec9 RootClingMain(int, char**, bool) /home/sss/root/root-6.24.06/src/root/core/dictgen/src/rootcling_impl.cxx:4861:43 root-project#27 0x00007f4120b40825 genreflex::invokeRootCling(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool, bool, bool, bool, bool, bool, bool, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, bool, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) /home/sss/root/root-6.24.06/src/root/core/dictgen/src/rootcling_impl.cxx:5326:46 root-project#28 0x00007f4120b426f6 GenReflexMain(int, char**) /home/sss/root/root-6.24.06/src/root/core/dictgen/src/rootcling_impl.cxx:6026:36 root-project#29 0x00007f4120b42b8d ROOT_rootcling_Driver /home/sss/root/root-6.24.06/src/root/core/dictgen/src/rootcling_impl.cxx:6097:29 root-project#30 0x0000000000401259 main /home/sss/root/root-6.24.06/src/root/main/src/rootcling.cxx:43:51 root-project#31 0x00007f411f73ab75 __libc_start_main (/lib64/libc.so.6+0x27b75) root-project#32 0x000000000040110e _start (/home/sss/root/root-6.24.06/rootsys/bin/genreflex+0x40110e) Stack dump: 0. Program arguments: rootcling -v2 -f x_gen.cxx -inlineInputHeader -Ixheaders x.h sel.xml sel.xml: <lcgdict> <class pattern="*iterator<*pair<const*,const*"/> </lcgdict> x.h: #include <string> #include <map> void foo (std::map<unsigned, std::string>& m, const std::string& s) { m.emplace (0, s); } or: #include <string> template <class T> struct tree_iterator {}; using value_type = std::pair<const unsigned, std::string>; using xiterator = tree_iterator<value_type>; class xtree { public: std::pair<xiterator, bool> emplace() { return std::pair<xiterator, bool>(xiterator(), false); } }; Difficult to reduce it further due to how rootcling implicitly reads headers.
1 task
ellert
added a commit
to ellert/root
that referenced
this pull request
Jan 28, 2025
526/1416 Test root-project#63: pyunittests-bindings-pyroot-pythonizations-pyroot-pyz-tf-pycallables ..........................***Failed 75.51 sec test_callable (tf_pycallables.TF1.test_callable) Test function provided as callable ... /usr/include/c++/15/bits/stl_bvector.h:1134: std::vector<bool, _Alloc>::reference std::vector<bool, _Alloc>::operator[](size_type) [with _Alloc = std::allocator<bool>; reference = std::vector<bool>::reference; size_type = long unsigned int]: Assertion '__n < this->size()' failed. *** Break *** abort =========================================================== The lines below might hint at the cause of the crash. If you see question marks as part of the stack trace, try to recompile with debugging information enabled and export CLING_DEBUG=1 environment variable before running. You may get help by asking at the ROOT forum https://root.cern/forum preferably using the command (.forum bug) in the ROOT prompt. Only if you are really convinced it is a bug in ROOT then please submit a report at https://root.cern/bugs or (preferably) using the command (.gh bug) in the ROOT prompt. Please post the ENTIRE stack trace from above as an attachment in addition to anything else that might help us fixing this issue. =========================================================== root-project#10 0x00007f6bcac7fea4 in __pthread_kill_implementation () from /lib64/libc.so.6 root-project#11 0x00007f6bcac264de in raise () from /lib64/libc.so.6 root-project#12 0x00007f6bcac0e350 in abort () from /lib64/libc.so.6 root-project#13 0x00007f6bc9a0be02 in std::__glibcxx_assert_fail(char const*, int, char const*, char const*) () from /lib64/libstdc++.so.6 root-project#14 0x00007f6bb9b15257 in std::vector<bool, std::allocator<bool> >::operator[](unsigned long) [clone .part.0] [clone .lto_priv.0] (__n=<optimized out>, this=<optimized out>) at /usr/include/c++/15/bits/stl_bvector.h:1134 root-project#15 0x00007f6bb9bab976 in std::vector<bool, std::allocator<bool> >::operator[] (this=<synthetic pointer>, __n=0) at /usr/include/c++/15/bits/stl_bvector.h:201 root-project#16 CPyCppyy::Utility::ConstructCallbackPreamble (retType="Double_t", argtypes=..., code=Python Exception <class 'IndexError'>: list index out of range root-project#17 0x00007f6bb9b389e0 in PyFunction_AsCPointer (pyobject=<optimized out>, pyobject entry=0x7f6bb8f838c0, rettype="Double_t", signature="(Double_t*,Double_t*)") at /builddir/build/BUILD/root-6.34.02-build/root-6.34.02/bindings/pyroot/cppyy/CPyCppyy/src/Converters.cxx:2713 root-project#18 0x00007f6bb9b39851 in CPyCppyy::(anonymous namespace)::FunctionPointerConverter::SetArg (this=0x55eb25d61d40, pyobject=0x7f6bb8f838c0, para=..., ctxt=0x7ffc484855c0) at /builddir/build/BUILD/root-6.34.02-build/root-6.34.02/bindings/pyroot/cppyy/CPyCppyy/src/Converters.cxx:2768
guitargeek
pushed a commit
that referenced
this pull request
Jan 31, 2025
526/1416 Test #63: pyunittests-bindings-pyroot-pythonizations-pyroot-pyz-tf-pycallables ..........................***Failed 75.51 sec test_callable (tf_pycallables.TF1.test_callable) Test function provided as callable ... /usr/include/c++/15/bits/stl_bvector.h:1134: std::vector<bool, _Alloc>::reference std::vector<bool, _Alloc>::operator[](size_type) [with _Alloc = std::allocator<bool>; reference = std::vector<bool>::reference; size_type = long unsigned int]: Assertion '__n < this->size()' failed. *** Break *** abort =========================================================== The lines below might hint at the cause of the crash. If you see question marks as part of the stack trace, try to recompile with debugging information enabled and export CLING_DEBUG=1 environment variable before running. You may get help by asking at the ROOT forum https://root.cern/forum preferably using the command (.forum bug) in the ROOT prompt. Only if you are really convinced it is a bug in ROOT then please submit a report at https://root.cern/bugs or (preferably) using the command (.gh bug) in the ROOT prompt. Please post the ENTIRE stack trace from above as an attachment in addition to anything else that might help us fixing this issue. =========================================================== #10 0x00007f6bcac7fea4 in __pthread_kill_implementation () from /lib64/libc.so.6 #11 0x00007f6bcac264de in raise () from /lib64/libc.so.6 #12 0x00007f6bcac0e350 in abort () from /lib64/libc.so.6 #13 0x00007f6bc9a0be02 in std::__glibcxx_assert_fail(char const*, int, char const*, char const*) () from /lib64/libstdc++.so.6 #14 0x00007f6bb9b15257 in std::vector<bool, std::allocator<bool> >::operator[](unsigned long) [clone .part.0] [clone .lto_priv.0] (__n=<optimized out>, this=<optimized out>) at /usr/include/c++/15/bits/stl_bvector.h:1134 #15 0x00007f6bb9bab976 in std::vector<bool, std::allocator<bool> >::operator[] (this=<synthetic pointer>, __n=0) at /usr/include/c++/15/bits/stl_bvector.h:201 #16 CPyCppyy::Utility::ConstructCallbackPreamble (retType="Double_t", argtypes=..., code=Python Exception <class 'IndexError'>: list index out of range #17 0x00007f6bb9b389e0 in PyFunction_AsCPointer (pyobject=<optimized out>, pyobject entry=0x7f6bb8f838c0, rettype="Double_t", signature="(Double_t*,Double_t*)") at /builddir/build/BUILD/root-6.34.02-build/root-6.34.02/bindings/pyroot/cppyy/CPyCppyy/src/Converters.cxx:2713 #18 0x00007f6bb9b39851 in CPyCppyy::(anonymous namespace)::FunctionPointerConverter::SetArg (this=0x55eb25d61d40, pyobject=0x7f6bb8f838c0, para=..., ctxt=0x7ffc484855c0) at /builddir/build/BUILD/root-6.34.02-build/root-6.34.02/bindings/pyroot/cppyy/CPyCppyy/src/Converters.cxx:2768
hageboeck
pushed a commit
to hageboeck/root
that referenced
this pull request
Feb 14, 2025
526/1416 Test root-project#63: pyunittests-bindings-pyroot-pythonizations-pyroot-pyz-tf-pycallables ..........................***Failed 75.51 sec test_callable (tf_pycallables.TF1.test_callable) Test function provided as callable ... /usr/include/c++/15/bits/stl_bvector.h:1134: std::vector<bool, _Alloc>::reference std::vector<bool, _Alloc>::operator[](size_type) [with _Alloc = std::allocator<bool>; reference = std::vector<bool>::reference; size_type = long unsigned int]: Assertion '__n < this->size()' failed. *** Break *** abort =========================================================== The lines below might hint at the cause of the crash. If you see question marks as part of the stack trace, try to recompile with debugging information enabled and export CLING_DEBUG=1 environment variable before running. You may get help by asking at the ROOT forum https://root.cern/forum preferably using the command (.forum bug) in the ROOT prompt. Only if you are really convinced it is a bug in ROOT then please submit a report at https://root.cern/bugs or (preferably) using the command (.gh bug) in the ROOT prompt. Please post the ENTIRE stack trace from above as an attachment in addition to anything else that might help us fixing this issue. =========================================================== #10 0x00007f6bcac7fea4 in __pthread_kill_implementation () from /lib64/libc.so.6 #11 0x00007f6bcac264de in raise () from /lib64/libc.so.6 #12 0x00007f6bcac0e350 in abort () from /lib64/libc.so.6 #13 0x00007f6bc9a0be02 in std::__glibcxx_assert_fail(char const*, int, char const*, char const*) () from /lib64/libstdc++.so.6 root-project#14 0x00007f6bb9b15257 in std::vector<bool, std::allocator<bool> >::operator[](unsigned long) [clone .part.0] [clone .lto_priv.0] (__n=<optimized out>, this=<optimized out>) at /usr/include/c++/15/bits/stl_bvector.h:1134 root-project#15 0x00007f6bb9bab976 in std::vector<bool, std::allocator<bool> >::operator[] (this=<synthetic pointer>, __n=0) at /usr/include/c++/15/bits/stl_bvector.h:201 root-project#16 CPyCppyy::Utility::ConstructCallbackPreamble (retType="Double_t", argtypes=..., code=Python Exception <class 'IndexError'>: list index out of range root-project#17 0x00007f6bb9b389e0 in PyFunction_AsCPointer (pyobject=<optimized out>, pyobject entry=0x7f6bb8f838c0, rettype="Double_t", signature="(Double_t*,Double_t*)") at /builddir/build/BUILD/root-6.34.02-build/root-6.34.02/bindings/pyroot/cppyy/CPyCppyy/src/Converters.cxx:2713 root-project#18 0x00007f6bb9b39851 in CPyCppyy::(anonymous namespace)::FunctionPointerConverter::SetArg (this=0x55eb25d61d40, pyobject=0x7f6bb8f838c0, para=..., ctxt=0x7ffc484855c0) at /builddir/build/BUILD/root-6.34.02-build/root-6.34.02/bindings/pyroot/cppyy/CPyCppyy/src/Converters.cxx:2768 (cherry picked from commit a87b474)
dpiparo
pushed a commit
that referenced
this pull request
Feb 18, 2025
526/1416 Test #63: pyunittests-bindings-pyroot-pythonizations-pyroot-pyz-tf-pycallables ..........................***Failed 75.51 sec test_callable (tf_pycallables.TF1.test_callable) Test function provided as callable ... /usr/include/c++/15/bits/stl_bvector.h:1134: std::vector<bool, _Alloc>::reference std::vector<bool, _Alloc>::operator[](size_type) [with _Alloc = std::allocator<bool>; reference = std::vector<bool>::reference; size_type = long unsigned int]: Assertion '__n < this->size()' failed. *** Break *** abort =========================================================== The lines below might hint at the cause of the crash. If you see question marks as part of the stack trace, try to recompile with debugging information enabled and export CLING_DEBUG=1 environment variable before running. You may get help by asking at the ROOT forum https://root.cern/forum preferably using the command (.forum bug) in the ROOT prompt. Only if you are really convinced it is a bug in ROOT then please submit a report at https://root.cern/bugs or (preferably) using the command (.gh bug) in the ROOT prompt. Please post the ENTIRE stack trace from above as an attachment in addition to anything else that might help us fixing this issue. =========================================================== #10 0x00007f6bcac7fea4 in __pthread_kill_implementation () from /lib64/libc.so.6 #11 0x00007f6bcac264de in raise () from /lib64/libc.so.6 #12 0x00007f6bcac0e350 in abort () from /lib64/libc.so.6 #13 0x00007f6bc9a0be02 in std::__glibcxx_assert_fail(char const*, int, char const*, char const*) () from /lib64/libstdc++.so.6 #14 0x00007f6bb9b15257 in std::vector<bool, std::allocator<bool> >::operator[](unsigned long) [clone .part.0] [clone .lto_priv.0] (__n=<optimized out>, this=<optimized out>) at /usr/include/c++/15/bits/stl_bvector.h:1134 #15 0x00007f6bb9bab976 in std::vector<bool, std::allocator<bool> >::operator[] (this=<synthetic pointer>, __n=0) at /usr/include/c++/15/bits/stl_bvector.h:201 #16 CPyCppyy::Utility::ConstructCallbackPreamble (retType="Double_t", argtypes=..., code=Python Exception <class 'IndexError'>: list index out of range #17 0x00007f6bb9b389e0 in PyFunction_AsCPointer (pyobject=<optimized out>, pyobject entry=0x7f6bb8f838c0, rettype="Double_t", signature="(Double_t*,Double_t*)") at /builddir/build/BUILD/root-6.34.02-build/root-6.34.02/bindings/pyroot/cppyy/CPyCppyy/src/Converters.cxx:2713 #18 0x00007f6bb9b39851 in CPyCppyy::(anonymous namespace)::FunctionPointerConverter::SetArg (this=0x55eb25d61d40, pyobject=0x7f6bb8f838c0, para=..., ctxt=0x7ffc484855c0) at /builddir/build/BUILD/root-6.34.02-build/root-6.34.02/bindings/pyroot/cppyy/CPyCppyy/src/Converters.cxx:2768 (cherry picked from commit a87b474)
dpiparo
pushed a commit
that referenced
this pull request
Apr 3, 2025
This fixes #18236 As seen in cms-sw/cmssw#47763 (comment) there are cases where the ROOT global lock is taken too late: In the stack trace below the lock is requested on frame #7 where as it should really be (also) requested on frame #12 as soon as the transaction is being generated. ``` #6 0x00001501421f55ea in ROOT::TVirtualRWMutex::Lock() () from /cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02883/el8_amd64_gcc12/cms/cmssw-patch/CMSSW_15_1_RNTUPLE_X_2025-03-31-2300/external/el8_amd64_gcc12/lib/libCore.so #7 0x0000150133a680ca in TCling::HandleNewTransaction(cling::Transaction const&) () from /cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02883/el8_amd64_gcc12/cms/cmssw-patch/CMSSW_15_1_RNTUPLE_X_2025-03-31-2300/external/el8_amd64_gcc12/lib/libCling.so #8 0x0000150133a85778 in TCling::UpdateListsOnCommitted(cling::Transaction const&) () from /cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02883/el8_amd64_gcc12/cms/cmssw-patch/CMSSW_15_1_RNTUPLE_X_2025-03-31-2300/external/el8_amd64_gcc12/lib/libCling.so #9 0x0000150133b60018 in cling::MultiplexInterpreterCallbacks::TransactionCommitted(cling::Transaction const&) () from /cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02883/el8_amd64_gcc12/cms/cmssw-patch/CMSSW_15_1_RNTUPLE_X_2025-03-31-2300/external/el8_amd64_gcc12/lib/libCling.so #10 0x0000150133bec069 in cling::IncrementalParser::commitTransaction(llvm::PointerIntPair<cling::Transaction*, 2u, cling::IncrementalParser::EParseResult, llvm::PointerLikeTypeTraits<cling::Transaction*>, llvm::PointerIntPairInfo<cling::Transaction*, 2u, llvm::PointerLikeTypeTraits<cling::Transaction*> > >&, bool) () from /cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02883/el8_amd64_gcc12/cms/cmssw-patch/CMSSW_15_1_RNTUPLE_X_2025-03-31-2300/external/el8_amd64_gcc12/lib/libCling.so #11 0x0000150133b5663a in cling::Interpreter::PushTransactionRAII::~PushTransactionRAII() () from /cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02883/el8_amd64_gcc12/cms/cmssw-patch/CMSSW_15_1_RNTUPLE_X_2025-03-31-2300/external/el8_amd64_gcc12/lib/libCling.so #12 0x0000150133b6b883 in cling::LookupHelper::findType(llvm::StringRef, cling::LookupHelper::DiagSetting) const () from /cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02883/el8_amd64_gcc12/cms/cmssw-patch/CMSSW_15_1_RNTUPLE_X_2025-03-31-2300/external/el8_amd64_gcc12/lib/libCling.so #13 0x00001501339b6b06 in ROOT::TMetaUtils::TClingLookupHelper::GetPartiallyDesugaredNameWithScopeHandling(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, bool) () from /cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02883/el8_amd64_gcc12/cms/cmssw-patch/CMSSW_15_1_RNTUPLE_X_2025-03-31-2300/external/el8_amd64_gcc12/lib/libCling.so #14 0x00001501422f1458 in ResolveTypedefProcessType(char const*, unsigned int, unsigned int, bool, unsigned int, unsigned int, unsigned int, bool&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) [clone .constprop.0] () from /cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02883/el8_amd64_gcc12/cms/cmssw-patch/CMSSW_15_1_RNTUPLE_X_2025-03-31-2300/external/el8_amd64_gcc12/lib/libCore.so #15 0x00001501422f1a0f in ResolveTypedefImpl(char const*, unsigned int, unsigned int&, bool&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) () from /cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02883/el8_amd64_gcc12/cms/cmssw-patch/CMSSW_15_1_RNTUPLE_X_2025-03-31-2300/external/el8_amd64_gcc12/lib/libCore.so #16 0x00001501422f2ef3 in TClassEdit::ResolveTypedef[abi:cxx11](char const*, bool) () from /cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02883/el8_amd64_gcc12/cms/cmssw-patch/CMSSW_15_1_RNTUPLE_X_2025-03-31-2300/external/el8_amd64_gcc12/lib/libCore.so #17 0x00001501422f5c20 in TClassEdit::TSplitType::ShortType(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, int) () from /cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02883/el8_amd64_gcc12/cms/cmssw-patch/CMSSW_15_1_RNTUPLE_X_2025-03-31-2300/external/el8_amd64_gcc12/lib/libCore.so #18 0x00001501422f6888 in TClassEdit::GetNormalizedName(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, std::basic_string_view<char, std::char_traits<char> >) () from /cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02883/el8_amd64_gcc12/cms/cmssw-patch/CMSSW_15_1_RNTUPLE_X_2025-03-31-2300/external/el8_amd64_gcc12/lib/libCore.so #19 0x000015014232e795 in ROOT::Internal::GetDemangledTypeName[abi:cxx11](std::type_info const&) () from /cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02883/el8_amd64_gcc12/cms/cmssw-patch/CMSSW_15_1_RNTUPLE_X_2025-03-31-2300/external/el8_amd64_gcc12/lib/libCore.so ```
edfink234
pushed a commit
to edfink234/root
that referenced
this pull request
Apr 7, 2025
[RFHS3] Remove mention of RapidYML backend, which is not supported. Due to lack of time, only one RooFit backend can be supported. On CMake configure, it, however, looked like RapidYML should be found. Here, the corresponding YML messages and mentions throughout the documentation are removed. If the backend should be revived, this commit can be reverted. Fix root-project#18128. Introduce TObject::SavePrimitiveVector Save array of doubles in C++ macro as std::vector<Double_t>. Should replace in code use of SavePrimitiveArray - while stack has limited memory and therefore plain arrays in macro can exhaust resources Use SavePrimitiveVector for TH1/TProfile classes Use SavePrimitiveVector in TGraph classes Use SavePrimitiveVector for TCutG/TScatter/TEfficiency Use SavePrimitiveVector for TF1/TF2 Use SavePrimitiveVector in TGraph2D Use SavePrimitiveVector in TPolyLine/Mraker/3D classes Remove SavePrimitiveArray Was replaced by SavePrimitiveVector. No longer used in the code, was not in released code [ntuple] Move RNTupleView out of Experimental No constraints to torch version in `requirements.txt` Now that pytorch/pytorch#138333 is fixed, commit 24fd0d8 can be reverted. [tree] check for return values in WriteBaskets Fixes https://its.cern.ch/jira/browse/ROOT-5137 [nfc] clangformat [nfc] modernize Co-authored-by: Philippe Canal <[email protected]> [core] escape pluses in TRegexp::MakeWildcard Fixes https://its.cern.ch/jira/browse/ROOT-7626 [Python] Format `rdf_filter_pyz.py` to pass ruff checks [Python] Fix RDF Pythonization tests with `builtin_llvm=OFF` On my machine, the RDF pythonization tests don't run when I build ROOT with `builtin_llvm=OFF`. There is a crash unless I do `import numba` in the beginning. I guess it's not a priority to understand the underlying problem because not many people build ROOT like this and the workaround is easy, but at least the tests should be green. We do the same "magically ordered imports" also in other Python tests where ROOT doesn't work together with xgboost because of `std::regexp` symbol clashes, unless you do the import in a certain order: root-project#15183 [hist] fix red highlight box in log mode Fixes root-project#12497 [ci] Disable TMVA on Alma8 [RF] Fix implementation of HS3 importers Fix by @guitargeek. The RooWSFactoryTool expression handler was not correctly matching branckets, leading to failures when importing valid JSON filed with RooProdPdf objects. [df] Avoid bad integer substitution in string formatting The '%lu' token used in RLoopManager::RunDataSource does not correspond to the correct integer representation of `std::uint64_t` on all platforms. We use a stringstream instead to construct the warning message. Introduce TObject::SavePrimitiveDraw method Store typical object->Draw() invocation. Correctly handle "nodraw" arguments in options Also replace special symbols if option string is not empty Use SavePrimitiveDraw in graf2d/graf classes Improve TGraphStruct::SavePrimitive Use new method to store constructor and attributes Simplify loops over nodes and edges Use fixed variable name for TGraphEdge Use SavePrimitiveDraw in hist classes Use SavePrimitiveDraw in other classes Fix TPave::SavePrimitive for web case In case when canvas created in the batch mode, it never rendered on server side. And thus coordinates of TPave object remains not-initialized. But there are macros where coordinates of TPaveStats are modified. Such modification stored in NDC coordinates and should be taken into account when TPave stored in C macro Adjust stressGraphics_web.ref after TPave adjustments Now positions of stats box modified in batch stored correctly [RF] fix segfault in fillLegacyCorrMatrix shown in https://root-forum.cern.ch/t/extracting-global-correlation-causes-a-seg-fault-with-sumw2error/55138 Implementing changes requested by @dpiparo [webgeom] resize workaround for qt6 Rendering inside qt5/qt6 does not provide correct size, therefore add resize handler in both cases Do not use `source_dir` in widgets This is location of JSROOT scripts, but normally one should use `import {something } from 'jsroot'` statement Now jsroot_importmap used in all widgets anyway Reduce source_dir usage in eve7 [ntuple] Move RNTupleWriter out of Experimental [hist] revert changes to v5 GetExpFormula fl_format Since it breaks backward compatibility Fixes root-project#18214 thanks guitargeek for finding out [skip-ci] cleaner docu Implementing changes requested by @dpiparo Move qt5web classes to qt6webdisplay They were used by both qt5 and qt6, now only for qt6 Completely delete qt5webdisplay sources Delete/deprecate qt5web build option Qt5 web engine no longer works with newest JSROOT and makes no sence to support. Everybody should be able to switch to comparable qt6 version Remove kQt5 from RWebDsiaplayArgs It was display kind for --web=qt5 argument Adjust tutorials/visualisation/webgui/qtweb Only support qt6 for building this tutorial Remove qt5 workaround in THttpServer For usage of qt5 webengine importmap has to be emulated Now such emulation is no longer necessary Introduce RWebDisplayArgs::GetQtEmbedQualifier Keep old GetQt5EmbedQualifier to backward compatibility, but prefer to use newer approach Use GetQtEmbedQualifier in qtweb tutorial Last place where qt5 was checked Remove qt5 from documentation and comments Update README/ReleaseNotes/v636/index.md Co-authored-by: Jonas Rembser <[email protected]> Use view framework with newest CEF Latest CEF 134 shows URL/tabs with native widgets Therefore switch to use of view framework starting from CEF 131 Update CEF readme with current CEF version Let configure usage of CEF views framework via rootrc parameter Use "WebGui.CefUseViews" parameter for this. Default is platform-dependent Mention CEF parameters in documentation [jsroot] dev 1/04/2025 1. Introduce `settings.FilesTimeout` to configure global timeout for file reading operations 2. Introduce `settings.FilesRemap` to let provide fallback address for http server, used for `root.cern` 3. Remove support of qt5 webengine, only qt6web is supported 4. Fix - correct axis range in `TScatter` drawing More use of RWebWindowWSHandler::GetBoolEnv Update docu Fix warning caused by RPadLength arithmetic operators Use `const` references as one should for `operator+` and `operator-`. This fixes the following warning I get when building ROOT with tests: ```txt In file included from /nix/store/aw0qxjd1phf16qhlwpdb4x87yymfv9rp-gcc-14-20241116/include/c++/14-20241116/x86_64-unknown-linux-gnu/bits/c++allocator.h:33, from /nix/store/aw0qxjd1phf16qhlwpdb4x87yymfv9rp-gcc-14-20241116/include/c++/14-20241116/bits/allocator.h:46, from /nix/store/aw0qxjd1phf16qhlwpdb4x87yymfv9rp-gcc-14-20241116/include/c++/14-20241116/memory:65, from /nix/store/qf61vad876jgyd4vnn147cz2jyvy23vl-gtest-1.16.0-dev/include/gtest/gtest.h:55, from /home/rembserj/code/root/root_src/graf2d/gpadv7/test/coords.cxx:12: In member function ‘void std::__new_allocator<_Tp>::deallocate(_Tp*, size_type) [with _Tp = double]’, inlined from ‘static void std::allocator_traits<std::allocator<_Tp1> >::deallocate(allocator_type&, pointer, size_type) [with _Tp = double]’ at /nix/store/aw0qxjd1phf16qhlwpdb4x87yymfv9rp-gcc-14-20241116/include/c++/14-20241116/bits/alloc_traits.h:544:23, inlined from ‘void std::_Vector_base<_Tp, _Alloc>::_M_deallocate(pointer, std::size_t) [with _Tp = double; _Alloc = std::allocator<double>]’ at /nix/store/aw0qxjd1phf16qhlwpdb4x87yymfv9rp-gcc-14-20241116/include/c++/14-20241116/bits/stl_vector.h:389:19, inlined from ‘void std::_Vector_base<_Tp, _Alloc>::_M_deallocate(pointer, std::size_t) [with _Tp = double; _Alloc = std::allocator<double>]’ at /nix/store/aw0qxjd1phf16qhlwpdb4x87yymfv9rp-gcc-14-20241116/include/c++/14-20241116/bits/stl_vector.h:385:7, inlined from ‘std::_Vector_base<_Tp, _Alloc>::~_Vector_base() [with _Tp = double; _Alloc = std::allocator<double>]’ at /nix/store/aw0qxjd1phf16qhlwpdb4x87yymfv9rp-gcc-14-20241116/include/c++/14-20241116/bits/stl_vector.h:368:15, inlined from ‘std::vector<_Tp, _Alloc>::~vector() [with _Tp = double; _Alloc = std::allocator<double>]’ at /nix/store/aw0qxjd1phf16qhlwpdb4x87yymfv9rp-gcc-14-20241116/include/c++/14-20241116/bits/stl_vector.h:738:7, inlined from ‘ROOT::Experimental::RPadLength::~RPadLength()’ at /home/rembserj/code/root/root_src/graf2d/gpadv7/inc/ROOT/RPadLength.hxx:31:7, inlined from ‘virtual void PadCoord_AddSubtract_Test::TestBody()’ at /home/rembserj/code/root/root_src/graf2d/gpadv7/test/coords.cxx:36:26: /nix/store/aw0qxjd1phf16qhlwpdb4x87yymfv9rp-gcc-14-20241116/include/c++/14-20241116/bits/new_allocator.h:172:33: warning: ‘void operator delete(void*, std::size_t)’ called on pointer ‘<unknown>’ with nonzero offset [1, 9223372036854775800] [-Wfree-nonheap-object] 172 | _GLIBCXX_OPERATOR_DELETE(_GLIBCXX_SIZED_DEALLOC(__p, __n)); | ^ In member function ‘_Tp* std::__new_allocator<_Tp>::allocate(size_type, const void*) [with _Tp = double]’, inlined from ‘static _Tp* std::allocator_traits<std::allocator<_Tp1> >::allocate(allocator_type&, size_type) [with _Tp = double]’ at /nix/store/aw0qxjd1phf16qhlwpdb4x87yymfv9rp-gcc-14-20241116/include/c++/14-20241116/bits/alloc_traits.h:509:28, inlined from ‘std::_Vector_base<_Tp, _Alloc>::pointer std::_Vector_base<_Tp, _Alloc>::_M_allocate(std::size_t) [with _Tp = double; _Alloc = std::allocator<double>]’ at /nix/store/aw0qxjd1phf16qhlwpdb4x87yymfv9rp-gcc-14-20241116/include/c++/14-20241116/bits/stl_vector.h:380:33, inlined from ‘void std::_Vector_base<_Tp, _Alloc>::_M_create_storage(std::size_t) [with _Tp = double; _Alloc = std::allocator<double>]’ at /nix/store/aw0qxjd1phf16qhlwpdb4x87yymfv9rp-gcc-14-20241116/include/c++/14-20241116/bits/stl_vector.h:398:44, inlined from ‘std::_Vector_base<_Tp, _Alloc>::_Vector_base(std::size_t, const allocator_type&) [with _Tp = double; _Alloc = std::allocator<double>]’ at /nix/store/aw0qxjd1phf16qhlwpdb4x87yymfv9rp-gcc-14-20241116/include/c++/14-20241116/bits/stl_vector.h:334:26, inlined from ‘std::vector<_Tp, _Alloc>::vector(const std::vector<_Tp, _Alloc>&) [with _Tp = double; _Alloc = std::allocator<double>]’ at /nix/store/aw0qxjd1phf16qhlwpdb4x87yymfv9rp-gcc-14-20241116/include/c++/14-20241116/bits/stl_vector.h:603:61, inlined from ‘ROOT::Experimental::RPadLength::RPadLength(const ROOT::Experimental::RPadLength&)’ at /home/rembserj/code/root/root_src/graf2d/gpadv7/inc/ROOT/RPadLength.hxx:31:7, inlined from ‘virtual void PadCoord_AddSubtract_Test::TestBody()’ at /home/rembserj/code/root/root_src/graf2d/gpadv7/test/coords.cxx:36:26: /nix/store/aw0qxjd1phf16qhlwpdb4x87yymfv9rp-gcc-14-20241116/include/c++/14-20241116/bits/new_allocator.h:151:55: note: returned from ‘void* operator new(std::size_t)’ 151 | return static_cast<_Tp*>(_GLIBCXX_OPERATOR_NEW(__n * sizeof(_Tp))); | ^ ``` Update WebDisplay.md file Modify RGeomViewer::SaveAsMacro Do not use RDirectory::Heap(). Just create shared_ptr variable outside of function scope Use "\n" instead of std::endl [Python] Correctly manage NumPy dependencey in pythonization tests The dependency on Python libraries like NumPy needs to be declared in the CMakeLists.txt, such that the test gets disabled when the library is not available. In some cases, the dependency on NumPy could be avoided by using the builtin "array" library. [Python] Apply suggestions by ruff [CPyCppyy] Don't use deprecated `PyErr_Fetch` and `PyErr_Restore` API Also, in some places the same logic could be implemented with just `PyErr_Clear()`. [Python] Update `sync-upstream` script for cppyyy syncups SearchInstalledSoftware.cmake: correctly report name of option to disable [skip-ci] cpu backend specify it's single threaded See root-project#17344 [DF] Retrieve RDatasetSpec for RDF built from JSON [CPyCppyy] Drop `__array__` from std::vector pythonizations The addition of the __array__ utility to std::vector Python proxies causes a bug where the resulting array is a single dimension, causing loss of data when converting to numpy arrays, for >1dim vectors. The recursive nature of this function, passes each subarray (pydata) to the next call and only the final buffer is cast to a lowlevel view and resized (in VectorData), resulting in only the first 1D array to be returned. See root-project#17729 Since this C++ pythonization was added with the upgrade in 6.32, and is only defined and used recursively, the safe option is to disable this function and no longer add it. It is temporarily removed to prevent errors due to -Wunused-function Revert "[ci] Disable TMVA on Alma8" This reverts commit ebab348. Protect PyMva tutorials for a failurte in importing tensorflow Disable also batchgenerator tests for Python version less than 3.9 since tensorflow is not working for these lower python versions Fix build issue on macOS 15.4 / XCode 16.3 `less` is defined in functional according to the C++ standard. cling: Add ROOT lock to LookupHelper::findType This fixes root-project#18236 As seen in cms-sw/cmssw#47763 (comment) there are cases where the ROOT global lock is taken too late: In the stack trace below the lock is requested on frame root-project#7 where as it should really be (also) requested on frame root-project#12 as soon as the transaction is being generated. ``` root-project#6 0x00001501421f55ea in ROOT::TVirtualRWMutex::Lock() () from /cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02883/el8_amd64_gcc12/cms/cmssw-patch/CMSSW_15_1_RNTUPLE_X_2025-03-31-2300/external/el8_amd64_gcc12/lib/libCore.so root-project#7 0x0000150133a680ca in TCling::HandleNewTransaction(cling::Transaction const&) () from /cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02883/el8_amd64_gcc12/cms/cmssw-patch/CMSSW_15_1_RNTUPLE_X_2025-03-31-2300/external/el8_amd64_gcc12/lib/libCling.so root-project#8 0x0000150133a85778 in TCling::UpdateListsOnCommitted(cling::Transaction const&) () from /cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02883/el8_amd64_gcc12/cms/cmssw-patch/CMSSW_15_1_RNTUPLE_X_2025-03-31-2300/external/el8_amd64_gcc12/lib/libCling.so root-project#9 0x0000150133b60018 in cling::MultiplexInterpreterCallbacks::TransactionCommitted(cling::Transaction const&) () from /cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02883/el8_amd64_gcc12/cms/cmssw-patch/CMSSW_15_1_RNTUPLE_X_2025-03-31-2300/external/el8_amd64_gcc12/lib/libCling.so root-project#10 0x0000150133bec069 in cling::IncrementalParser::commitTransaction(llvm::PointerIntPair<cling::Transaction*, 2u, cling::IncrementalParser::EParseResult, llvm::PointerLikeTypeTraits<cling::Transaction*>, llvm::PointerIntPairInfo<cling::Transaction*, 2u, llvm::PointerLikeTypeTraits<cling::Transaction*> > >&, bool) () from /cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02883/el8_amd64_gcc12/cms/cmssw-patch/CMSSW_15_1_RNTUPLE_X_2025-03-31-2300/external/el8_amd64_gcc12/lib/libCling.so root-project#11 0x0000150133b5663a in cling::Interpreter::PushTransactionRAII::~PushTransactionRAII() () from /cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02883/el8_amd64_gcc12/cms/cmssw-patch/CMSSW_15_1_RNTUPLE_X_2025-03-31-2300/external/el8_amd64_gcc12/lib/libCling.so root-project#12 0x0000150133b6b883 in cling::LookupHelper::findType(llvm::StringRef, cling::LookupHelper::DiagSetting) const () from /cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02883/el8_amd64_gcc12/cms/cmssw-patch/CMSSW_15_1_RNTUPLE_X_2025-03-31-2300/external/el8_amd64_gcc12/lib/libCling.so root-project#13 0x00001501339b6b06 in ROOT::TMetaUtils::TClingLookupHelper::GetPartiallyDesugaredNameWithScopeHandling(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, bool) () from /cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02883/el8_amd64_gcc12/cms/cmssw-patch/CMSSW_15_1_RNTUPLE_X_2025-03-31-2300/external/el8_amd64_gcc12/lib/libCling.so root-project#14 0x00001501422f1458 in ResolveTypedefProcessType(char const*, unsigned int, unsigned int, bool, unsigned int, unsigned int, unsigned int, bool&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) [clone .constprop.0] () from /cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02883/el8_amd64_gcc12/cms/cmssw-patch/CMSSW_15_1_RNTUPLE_X_2025-03-31-2300/external/el8_amd64_gcc12/lib/libCore.so root-project#15 0x00001501422f1a0f in ResolveTypedefImpl(char const*, unsigned int, unsigned int&, bool&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) () from /cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02883/el8_amd64_gcc12/cms/cmssw-patch/CMSSW_15_1_RNTUPLE_X_2025-03-31-2300/external/el8_amd64_gcc12/lib/libCore.so root-project#16 0x00001501422f2ef3 in TClassEdit::ResolveTypedef[abi:cxx11](char const*, bool) () from /cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02883/el8_amd64_gcc12/cms/cmssw-patch/CMSSW_15_1_RNTUPLE_X_2025-03-31-2300/external/el8_amd64_gcc12/lib/libCore.so root-project#17 0x00001501422f5c20 in TClassEdit::TSplitType::ShortType(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, int) () from /cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02883/el8_amd64_gcc12/cms/cmssw-patch/CMSSW_15_1_RNTUPLE_X_2025-03-31-2300/external/el8_amd64_gcc12/lib/libCore.so root-project#18 0x00001501422f6888 in TClassEdit::GetNormalizedName(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, std::basic_string_view<char, std::char_traits<char> >) () from /cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02883/el8_amd64_gcc12/cms/cmssw-patch/CMSSW_15_1_RNTUPLE_X_2025-03-31-2300/external/el8_amd64_gcc12/lib/libCore.so root-project#19 0x000015014232e795 in ROOT::Internal::GetDemangledTypeName[abi:cxx11](std::type_info const&) () from /cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02883/el8_amd64_gcc12/cms/cmssw-patch/CMSSW_15_1_RNTUPLE_X_2025-03-31-2300/external/el8_amd64_gcc12/lib/libCore.so ``` [ntuple] Add tests and a warning for projected Real32(Quant|Trunc) Setting a projected field to quantized or truncated works and read proper data but it doesn't do what one would probably expect. The projected field can correctly read values from any fields that can be read as float, but the value range and bits of precision set on the projected field are silently ignored (since they only make sense for physical columns that are actually stored on disk). To reduce confusion, we now emit a warning if a user tries to call AddProjectedField with a quantized or truncated field. Remove current RHist prototype For a number of reasons, it is not what we want for the future generation of histogram classes in ROOT: * It is templated on the DIMENSIONS, the PRECISION, and optional bin statistics. This makes it hard(er) to use for IO. * The RHist interface has a pointer to an abstract, polymorphic RHistImplBase. * The concrete RHistImpl is templated on the processed axis types. * The polymorphic pointer makes the current prototype incompatible with RNTuple (unless using streamer fields). * It also takes minutes to compile for higher dimensions because concrete RHistImpl have to be generated for all combinations of axis types, which grows exponentially. The plan is to remove the current prototype now, in time for the next ROOT release v6.36, and then add a new implementation after. [hist] reset kAxisRange bit when fully unzooming (root-project#18226) When unzoom with mouse wheel, properly reset kAxisRange bit. Adjust documentation [graf] Patch libAsimage: fp.h is now part of math.h Thanks to @ktf (ALICE) for this fix. [runtime-cxxmodules] Adapt the darwin modulemaps to sdk 15.4. (root-project#18231) * [runtime-cxxmodules] Adapt the darwin modulemaps to sdk 15.4. * [runtime-cxmodules] Use separate modulemap for macOS15.2 * [runtime-cxxmodules] Add overlay entry for MacOSX15.2 --------- Co-authored-by: Devajith Valaparambil Sreeramaswamy <[email protected]> [skip-CI][cling] Refine build and usage guide (root-project#18161) * [cling] Refine build and usage guide Clarified standalone and LLVM-integrated build methods, along with usage instructions. Improved installation steps to ensure successful execution. * [cling] Fix broken link to web page in README Updated the "See also" link in the README to point to the latest version of Cling's web page on GitHack. The previous link referenced a specific commit, which could become outdated. Now, it directly points to the master branch for a more up-to-date reference. * [cling] Improve Cling standalone build instruction Refined the README to provide clearer instructions for building Cling as a standalone project. Updated CMake configuration details, clarified dependency setup, and provided an example command to help users correctly specify LLVM build paths. These improvements aim to make the build process more comprehensible and reduce potential confusion. * [skip-ci] update link to binaries * [skip-ci] fix jupyter link Fixes root-project/cling#527 * [skip-ci] also mention jupyter notebook option see root-project/cling#537 --------- Co-authored-by: ferdymercury <[email protected]> [ntuple] Move RNTupleReader out of Experimental [rfile] Remove current RFile prototype It will replaced by a new prototype after 6.36. The new prototype will go in a different direction by removing the shared ownership between RFile and the application and it won't have RFile inherit from RDirectory. [hist] Add function to get sum of weights including under/overflows Fix root-project#8951 Co-authored-by: Stephan Hageboeck <[email protected]> [cling][JIT] Inject compiler-rt complex division symbols on macOS Clang may emit calls to compiler-rt symbols such as __divdc3 for std::complex<T> division. These may not be resolved during JIT'ing on macOS when using Cling. This patch forward-declares the relevant symbols and explicitly injects them into the JIT symbol table. Similar to: root-project@4b6075b [rbrowser] do not allow to select text in items list [rbrowser] implement items drag and drop Drop handler behaves very similar to drawing with append flag, but does not try to create new widget [rbrowser] let switch between double-click and plain click handler Double-click is ROOT-like style of drawing while single-click is openui5. In last case one also can use keyboard navigation for drawing [rbrowser] Change columns context menu Old functionality deprecated, one need to have something else. Assign to each column headmenu instead [rbrowser] let resize columns via context menu Add 'Resize colums' to context menu [jsroot] dev 4/04/2025 1. Set 'user-select: none' style in drawings to exclude text selection, using `settings.UserSelect` value 2. Better handling of remap of file URL [cmake] Update the version of VDT to 0.4.6 to address the new behaviour of the compiler shipped with XCode 16.3 Properly format the preprocessor if clause following pnggroup/libpng@893b811 [interop] Upgrade to latest, add tag file for diff workflow [ntuple] Mark some CreateEntry const RNTupleReader::CreateEntry() needs to call GetModel(), which is not const. [ntuple] Move RFieldToken out of REntry It will also be used by RRawPtrWriteEntry. [ntuple] Refactor RNTupleFillContext::Fill* ... to avoid code duplication when adding RRawPtrWriteEntry. [ntuple] Implement Detail::RRawPtrWriteEntry It is a container of const raw pointers that can be used to write constant data products in frameworks. Closes root-project#17900 [ntuple] Demonstrate RRawPtrWriteEntry in ntpl014_framework.C [ntuple] Amend documentation on model ID check [tmva][sofie] memory optimization in convK and imcol for ConvTranspose (root-project#18168) * feat: add convK and imcol to memory optimization for ConvTranspose * fix: follow root naming convention for convK and imcol [tmva][sofie] Optimize LayerNormalization operator Do square operation do not use std::pow with base 2 since it is slower than simple multiplication This speeds up evaluation on ATLAS GNN tracking model by 40% Also avoids allocating a small shape vector in LayerNorm and improve indentation of sigmoid operator [TMVA] Disable relevant PyMVA tests if BLAS is not found This commit makes sure that the tests of PyMVA that require BLAS (indirectly via SOFIE) are not run when BLAS is not available. Following up on this PR, which did the same change already for the SOFIE tests: root-project#18065 [CMake] Veto tutorials depending on BLAS if it was not found Closes root-project#16720. Fix a warning when compiling quartz on macos 15.4 with clt 16.3 [tree] Avoid reading from nullptr in TTreeReader. When a TTreeReaderValue is not initialised correctly, it generates an error message. It could, however, inadvertently read a nullptr in doing that. Fix memory leak identified with valgrind in HistFactory histogram reading Apply clang-format [core] improve TDirectory::DecodeNameCycle - avoid scanning the string twice - allow `name` to be null if one only wants the cycle - return the actual name length so the caller can know whether the name was truncated or not - improve function documentation [cppyy] Disable warnings for invalid function casts Some C++ functions defined in CPyCppyy are passed to CPython API, e.g. to build Python methods that use some C++ functionality. This is done by creating a instance of a PyMethodDef struct (https://docs.python.org/3/c-api/structures.html#c.PyMethodDef). One data member of this struct is of type PyCFunction (https://docs.python.org/3/c-api/structures.html#c.PyCFunction), a typedef of a function with signature ``` PyObject *PyCFunction(PyObject *self, PyObject *args); ``` In many cases, the C++ functions that are used as the data member of the PyMethodDef are not directly implemented as PyCFunction, thus need to be cast. This cast is often invalid, since many of such functions do not really respect the function signature prescribed by the API. This pattern is actually encouraged for CPython extension implementations by the official CPython docs (https://docs.python.org/3/extending/extending.html#keyword-parameters-for-extension-functions). As such, the compiler warnings that are generated becausee of the invalid function casts, for example ``` root/bindings/pyroot/cppyy/CPyCppyy/src/Pythonize.cxx:1949:50: warning: cast from 'PyObject *(*)(PyObject *)' (aka '_object *(*)(_object *)') to 'PyCFunction' (aka '_object *(*)(_object *, _object *)') converts to incompatible function type [-Wcast-function-type-mismatch] 1949 | Utility::AddToClass(pyclass, "__repr__", (PyCFunction)ComplexRepr, METH_NOARGS); ``` cannot be avoided and have to be suppressed. This is also done upstream, see wlav/CPyCppyy@33d4a6e Implementing requested changes by @vepadulano [tree] Reset missing proxies list when changing trees. When changing trees while the missing value feature of RDF was in use, the proxies for branches could not get recreated, since TTreeReader refuses the registration when fProxiesSet == true. This lead to the TTreeReaderValue being in a broken state. [tree] Refactor vector of missing proxies to a set. When running over multiple trees, the list of missing proxies in TTreeReader will grow indefinitely. Here, it is refactored to a set, which also shortens the code that looks up the missing proxies. [tree] Include branch name in an error message. Pointed out by Philippe in root-project#18259. [tree] Make test of error messages a bit more rigid. In debugging a UB in TTreeReaderValueBase, it would have been easier to have an explicit note of the expected error messages of that test. Instead of globally suppressing all errors, the three expected message were added here. [tree] Don't dereference a nullptr in TTreeReaderValue test. On mac15 beta, this generated a SIGTRAP, while it was OK on all other platforms, because the reference was never used. But retrieving the pointer instead of dereferencing, the problem seems to go away. [CMake] Restore Python tutorial dependencies. Due to a missing quote, dependencies on Mac15 beta seemed to have gotten deleted. [ntuple] apply I/O rules also to persistent members [ntuple] test I/O rule of persistent member [json] check if map class has dictionary When stream directly std::map object in macro like: ``` std::map<int,string> m; m[1] = "number 1"; m[2] = "number 2"; auto json = TBufferJSON::ToJSON(&m); ``` Real dictionary class for std::map is required. It checked automatically when map is member of user class, but was not checked when map object intself streamed [json] check map dictionary also when read object Same when write object, reading is not possible for std::map<> object without dictionary [json] mention GenerateDictionary for map classes in documentation While std::map uses in TBufferJSON in documentaiton, mention gInterpreter->GenerateDictionary [CMake] Improve handling of RPATH options Some improvements to the handling of RPATH options, which are necessary on my system because I need to add a custom RPATH to make my CUDA package from nix packages findable. 1. Don't set CMake variables to `FALSE` if the default is `FALSE` already. This makes it impossible to change these variables from the CMake user configuration, unnecessarily taking flexibility out of the build system. 2. If `rpath=ON`, ROOT adds the relative path from the binary directory to the lib directory to the RPATH. But it doesn't append it, overriding any `CMAKE_INSTALL_RPATH` that the user might set in the CMake configuration. This commit suggests to append instead. 3. If `rpath=OFF`, ROOT sets `CMAKE_SKIP_INSTALL_RPATH` to `TRUE` without any apparent reason, again, preventing the user from defining the RPATH via `CMAKE_INSTALL_RPATH`. This commit suggests to remove that line. [cppyy] Do not use non-C++ GCC warning Although `bad-function-cast` is present for both Clang and GCC, on the latter it is only used for C and Objective-C code. Using `no-cast-function-type` seems to already disable the PyCFunction-cast-related warnings seen with AppleClang. [ntuple] update RNTupleModel's documentation [math] Ignore vla-cxx-extension in case veccore is active Reintroduce rcanvas_mt.cxx demo with TH1 classes Old macro was used RH1D classes But RCanvas multithreading can be tested without it [rbrowser] reintroduce provider for RCanvas class RBrowser has to know about RCanvas class and which library to load to get access to that class [jsroot] dev 4/04/2025 with RPad fix Fix redraw of RPad primitives Adjust RAxis drawing Adding suggestions from @ferdymercury
edfink234
pushed a commit
to edfink234/root
that referenced
this pull request
Apr 11, 2025
[RFHS3] Remove mention of RapidYML backend, which is not supported. Due to lack of time, only one RooFit backend can be supported. On CMake configure, it, however, looked like RapidYML should be found. Here, the corresponding YML messages and mentions throughout the documentation are removed. If the backend should be revived, this commit can be reverted. Fix root-project#18128. Introduce TObject::SavePrimitiveVector Save array of doubles in C++ macro as std::vector<Double_t>. Should replace in code use of SavePrimitiveArray - while stack has limited memory and therefore plain arrays in macro can exhaust resources Use SavePrimitiveVector for TH1/TProfile classes Use SavePrimitiveVector in TGraph classes Use SavePrimitiveVector for TCutG/TScatter/TEfficiency Use SavePrimitiveVector for TF1/TF2 Use SavePrimitiveVector in TGraph2D Use SavePrimitiveVector in TPolyLine/Mraker/3D classes Remove SavePrimitiveArray Was replaced by SavePrimitiveVector. No longer used in the code, was not in released code [ntuple] Move RNTupleView out of Experimental No constraints to torch version in `requirements.txt` Now that pytorch/pytorch#138333 is fixed, commit 24fd0d8 can be reverted. [tree] check for return values in WriteBaskets Fixes https://its.cern.ch/jira/browse/ROOT-5137 [nfc] clangformat [nfc] modernize Co-authored-by: Philippe Canal <[email protected]> [core] escape pluses in TRegexp::MakeWildcard Fixes https://its.cern.ch/jira/browse/ROOT-7626 [Python] Format `rdf_filter_pyz.py` to pass ruff checks [Python] Fix RDF Pythonization tests with `builtin_llvm=OFF` On my machine, the RDF pythonization tests don't run when I build ROOT with `builtin_llvm=OFF`. There is a crash unless I do `import numba` in the beginning. I guess it's not a priority to understand the underlying problem because not many people build ROOT like this and the workaround is easy, but at least the tests should be green. We do the same "magically ordered imports" also in other Python tests where ROOT doesn't work together with xgboost because of `std::regexp` symbol clashes, unless you do the import in a certain order: root-project#15183 [hist] fix red highlight box in log mode Fixes root-project#12497 [ci] Disable TMVA on Alma8 [RF] Fix implementation of HS3 importers Fix by @guitargeek. The RooWSFactoryTool expression handler was not correctly matching branckets, leading to failures when importing valid JSON filed with RooProdPdf objects. [df] Avoid bad integer substitution in string formatting The '%lu' token used in RLoopManager::RunDataSource does not correspond to the correct integer representation of `std::uint64_t` on all platforms. We use a stringstream instead to construct the warning message. Introduce TObject::SavePrimitiveDraw method Store typical object->Draw() invocation. Correctly handle "nodraw" arguments in options Also replace special symbols if option string is not empty Use SavePrimitiveDraw in graf2d/graf classes Improve TGraphStruct::SavePrimitive Use new method to store constructor and attributes Simplify loops over nodes and edges Use fixed variable name for TGraphEdge Use SavePrimitiveDraw in hist classes Use SavePrimitiveDraw in other classes Fix TPave::SavePrimitive for web case In case when canvas created in the batch mode, it never rendered on server side. And thus coordinates of TPave object remains not-initialized. But there are macros where coordinates of TPaveStats are modified. Such modification stored in NDC coordinates and should be taken into account when TPave stored in C macro Adjust stressGraphics_web.ref after TPave adjustments Now positions of stats box modified in batch stored correctly [RF] fix segfault in fillLegacyCorrMatrix shown in https://root-forum.cern.ch/t/extracting-global-correlation-causes-a-seg-fault-with-sumw2error/55138 Implementing changes requested by @dpiparo [webgeom] resize workaround for qt6 Rendering inside qt5/qt6 does not provide correct size, therefore add resize handler in both cases Do not use `source_dir` in widgets This is location of JSROOT scripts, but normally one should use `import {something } from 'jsroot'` statement Now jsroot_importmap used in all widgets anyway Reduce source_dir usage in eve7 [ntuple] Move RNTupleWriter out of Experimental [hist] revert changes to v5 GetExpFormula fl_format Since it breaks backward compatibility Fixes root-project#18214 thanks guitargeek for finding out [skip-ci] cleaner docu Implementing changes requested by @dpiparo Move qt5web classes to qt6webdisplay They were used by both qt5 and qt6, now only for qt6 Completely delete qt5webdisplay sources Delete/deprecate qt5web build option Qt5 web engine no longer works with newest JSROOT and makes no sence to support. Everybody should be able to switch to comparable qt6 version Remove kQt5 from RWebDsiaplayArgs It was display kind for --web=qt5 argument Adjust tutorials/visualisation/webgui/qtweb Only support qt6 for building this tutorial Remove qt5 workaround in THttpServer For usage of qt5 webengine importmap has to be emulated Now such emulation is no longer necessary Introduce RWebDisplayArgs::GetQtEmbedQualifier Keep old GetQt5EmbedQualifier to backward compatibility, but prefer to use newer approach Use GetQtEmbedQualifier in qtweb tutorial Last place where qt5 was checked Remove qt5 from documentation and comments Update README/ReleaseNotes/v636/index.md Co-authored-by: Jonas Rembser <[email protected]> Use view framework with newest CEF Latest CEF 134 shows URL/tabs with native widgets Therefore switch to use of view framework starting from CEF 131 Update CEF readme with current CEF version Let configure usage of CEF views framework via rootrc parameter Use "WebGui.CefUseViews" parameter for this. Default is platform-dependent Mention CEF parameters in documentation [jsroot] dev 1/04/2025 1. Introduce `settings.FilesTimeout` to configure global timeout for file reading operations 2. Introduce `settings.FilesRemap` to let provide fallback address for http server, used for `root.cern` 3. Remove support of qt5 webengine, only qt6web is supported 4. Fix - correct axis range in `TScatter` drawing More use of RWebWindowWSHandler::GetBoolEnv Update docu Fix warning caused by RPadLength arithmetic operators Use `const` references as one should for `operator+` and `operator-`. This fixes the following warning I get when building ROOT with tests: ```txt In file included from /nix/store/aw0qxjd1phf16qhlwpdb4x87yymfv9rp-gcc-14-20241116/include/c++/14-20241116/x86_64-unknown-linux-gnu/bits/c++allocator.h:33, from /nix/store/aw0qxjd1phf16qhlwpdb4x87yymfv9rp-gcc-14-20241116/include/c++/14-20241116/bits/allocator.h:46, from /nix/store/aw0qxjd1phf16qhlwpdb4x87yymfv9rp-gcc-14-20241116/include/c++/14-20241116/memory:65, from /nix/store/qf61vad876jgyd4vnn147cz2jyvy23vl-gtest-1.16.0-dev/include/gtest/gtest.h:55, from /home/rembserj/code/root/root_src/graf2d/gpadv7/test/coords.cxx:12: In member function ‘void std::__new_allocator<_Tp>::deallocate(_Tp*, size_type) [with _Tp = double]’, inlined from ‘static void std::allocator_traits<std::allocator<_Tp1> >::deallocate(allocator_type&, pointer, size_type) [with _Tp = double]’ at /nix/store/aw0qxjd1phf16qhlwpdb4x87yymfv9rp-gcc-14-20241116/include/c++/14-20241116/bits/alloc_traits.h:544:23, inlined from ‘void std::_Vector_base<_Tp, _Alloc>::_M_deallocate(pointer, std::size_t) [with _Tp = double; _Alloc = std::allocator<double>]’ at /nix/store/aw0qxjd1phf16qhlwpdb4x87yymfv9rp-gcc-14-20241116/include/c++/14-20241116/bits/stl_vector.h:389:19, inlined from ‘void std::_Vector_base<_Tp, _Alloc>::_M_deallocate(pointer, std::size_t) [with _Tp = double; _Alloc = std::allocator<double>]’ at /nix/store/aw0qxjd1phf16qhlwpdb4x87yymfv9rp-gcc-14-20241116/include/c++/14-20241116/bits/stl_vector.h:385:7, inlined from ‘std::_Vector_base<_Tp, _Alloc>::~_Vector_base() [with _Tp = double; _Alloc = std::allocator<double>]’ at /nix/store/aw0qxjd1phf16qhlwpdb4x87yymfv9rp-gcc-14-20241116/include/c++/14-20241116/bits/stl_vector.h:368:15, inlined from ‘std::vector<_Tp, _Alloc>::~vector() [with _Tp = double; _Alloc = std::allocator<double>]’ at /nix/store/aw0qxjd1phf16qhlwpdb4x87yymfv9rp-gcc-14-20241116/include/c++/14-20241116/bits/stl_vector.h:738:7, inlined from ‘ROOT::Experimental::RPadLength::~RPadLength()’ at /home/rembserj/code/root/root_src/graf2d/gpadv7/inc/ROOT/RPadLength.hxx:31:7, inlined from ‘virtual void PadCoord_AddSubtract_Test::TestBody()’ at /home/rembserj/code/root/root_src/graf2d/gpadv7/test/coords.cxx:36:26: /nix/store/aw0qxjd1phf16qhlwpdb4x87yymfv9rp-gcc-14-20241116/include/c++/14-20241116/bits/new_allocator.h:172:33: warning: ‘void operator delete(void*, std::size_t)’ called on pointer ‘<unknown>’ with nonzero offset [1, 9223372036854775800] [-Wfree-nonheap-object] 172 | _GLIBCXX_OPERATOR_DELETE(_GLIBCXX_SIZED_DEALLOC(__p, __n)); | ^ In member function ‘_Tp* std::__new_allocator<_Tp>::allocate(size_type, const void*) [with _Tp = double]’, inlined from ‘static _Tp* std::allocator_traits<std::allocator<_Tp1> >::allocate(allocator_type&, size_type) [with _Tp = double]’ at /nix/store/aw0qxjd1phf16qhlwpdb4x87yymfv9rp-gcc-14-20241116/include/c++/14-20241116/bits/alloc_traits.h:509:28, inlined from ‘std::_Vector_base<_Tp, _Alloc>::pointer std::_Vector_base<_Tp, _Alloc>::_M_allocate(std::size_t) [with _Tp = double; _Alloc = std::allocator<double>]’ at /nix/store/aw0qxjd1phf16qhlwpdb4x87yymfv9rp-gcc-14-20241116/include/c++/14-20241116/bits/stl_vector.h:380:33, inlined from ‘void std::_Vector_base<_Tp, _Alloc>::_M_create_storage(std::size_t) [with _Tp = double; _Alloc = std::allocator<double>]’ at /nix/store/aw0qxjd1phf16qhlwpdb4x87yymfv9rp-gcc-14-20241116/include/c++/14-20241116/bits/stl_vector.h:398:44, inlined from ‘std::_Vector_base<_Tp, _Alloc>::_Vector_base(std::size_t, const allocator_type&) [with _Tp = double; _Alloc = std::allocator<double>]’ at /nix/store/aw0qxjd1phf16qhlwpdb4x87yymfv9rp-gcc-14-20241116/include/c++/14-20241116/bits/stl_vector.h:334:26, inlined from ‘std::vector<_Tp, _Alloc>::vector(const std::vector<_Tp, _Alloc>&) [with _Tp = double; _Alloc = std::allocator<double>]’ at /nix/store/aw0qxjd1phf16qhlwpdb4x87yymfv9rp-gcc-14-20241116/include/c++/14-20241116/bits/stl_vector.h:603:61, inlined from ‘ROOT::Experimental::RPadLength::RPadLength(const ROOT::Experimental::RPadLength&)’ at /home/rembserj/code/root/root_src/graf2d/gpadv7/inc/ROOT/RPadLength.hxx:31:7, inlined from ‘virtual void PadCoord_AddSubtract_Test::TestBody()’ at /home/rembserj/code/root/root_src/graf2d/gpadv7/test/coords.cxx:36:26: /nix/store/aw0qxjd1phf16qhlwpdb4x87yymfv9rp-gcc-14-20241116/include/c++/14-20241116/bits/new_allocator.h:151:55: note: returned from ‘void* operator new(std::size_t)’ 151 | return static_cast<_Tp*>(_GLIBCXX_OPERATOR_NEW(__n * sizeof(_Tp))); | ^ ``` Update WebDisplay.md file Modify RGeomViewer::SaveAsMacro Do not use RDirectory::Heap(). Just create shared_ptr variable outside of function scope Use "\n" instead of std::endl [Python] Correctly manage NumPy dependencey in pythonization tests The dependency on Python libraries like NumPy needs to be declared in the CMakeLists.txt, such that the test gets disabled when the library is not available. In some cases, the dependency on NumPy could be avoided by using the builtin "array" library. [Python] Apply suggestions by ruff [CPyCppyy] Don't use deprecated `PyErr_Fetch` and `PyErr_Restore` API Also, in some places the same logic could be implemented with just `PyErr_Clear()`. [Python] Update `sync-upstream` script for cppyyy syncups SearchInstalledSoftware.cmake: correctly report name of option to disable [skip-ci] cpu backend specify it's single threaded See root-project#17344 [DF] Retrieve RDatasetSpec for RDF built from JSON [CPyCppyy] Drop `__array__` from std::vector pythonizations The addition of the __array__ utility to std::vector Python proxies causes a bug where the resulting array is a single dimension, causing loss of data when converting to numpy arrays, for >1dim vectors. The recursive nature of this function, passes each subarray (pydata) to the next call and only the final buffer is cast to a lowlevel view and resized (in VectorData), resulting in only the first 1D array to be returned. See root-project#17729 Since this C++ pythonization was added with the upgrade in 6.32, and is only defined and used recursively, the safe option is to disable this function and no longer add it. It is temporarily removed to prevent errors due to -Wunused-function Revert "[ci] Disable TMVA on Alma8" This reverts commit ebab348. Protect PyMva tutorials for a failurte in importing tensorflow Disable also batchgenerator tests for Python version less than 3.9 since tensorflow is not working for these lower python versions Fix build issue on macOS 15.4 / XCode 16.3 `less` is defined in functional according to the C++ standard. cling: Add ROOT lock to LookupHelper::findType This fixes root-project#18236 As seen in cms-sw/cmssw#47763 (comment) there are cases where the ROOT global lock is taken too late: In the stack trace below the lock is requested on frame root-project#7 where as it should really be (also) requested on frame root-project#12 as soon as the transaction is being generated. ``` root-project#6 0x00001501421f55ea in ROOT::TVirtualRWMutex::Lock() () from /cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02883/el8_amd64_gcc12/cms/cmssw-patch/CMSSW_15_1_RNTUPLE_X_2025-03-31-2300/external/el8_amd64_gcc12/lib/libCore.so root-project#7 0x0000150133a680ca in TCling::HandleNewTransaction(cling::Transaction const&) () from /cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02883/el8_amd64_gcc12/cms/cmssw-patch/CMSSW_15_1_RNTUPLE_X_2025-03-31-2300/external/el8_amd64_gcc12/lib/libCling.so root-project#8 0x0000150133a85778 in TCling::UpdateListsOnCommitted(cling::Transaction const&) () from /cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02883/el8_amd64_gcc12/cms/cmssw-patch/CMSSW_15_1_RNTUPLE_X_2025-03-31-2300/external/el8_amd64_gcc12/lib/libCling.so root-project#9 0x0000150133b60018 in cling::MultiplexInterpreterCallbacks::TransactionCommitted(cling::Transaction const&) () from /cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02883/el8_amd64_gcc12/cms/cmssw-patch/CMSSW_15_1_RNTUPLE_X_2025-03-31-2300/external/el8_amd64_gcc12/lib/libCling.so root-project#10 0x0000150133bec069 in cling::IncrementalParser::commitTransaction(llvm::PointerIntPair<cling::Transaction*, 2u, cling::IncrementalParser::EParseResult, llvm::PointerLikeTypeTraits<cling::Transaction*>, llvm::PointerIntPairInfo<cling::Transaction*, 2u, llvm::PointerLikeTypeTraits<cling::Transaction*> > >&, bool) () from /cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02883/el8_amd64_gcc12/cms/cmssw-patch/CMSSW_15_1_RNTUPLE_X_2025-03-31-2300/external/el8_amd64_gcc12/lib/libCling.so root-project#11 0x0000150133b5663a in cling::Interpreter::PushTransactionRAII::~PushTransactionRAII() () from /cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02883/el8_amd64_gcc12/cms/cmssw-patch/CMSSW_15_1_RNTUPLE_X_2025-03-31-2300/external/el8_amd64_gcc12/lib/libCling.so root-project#12 0x0000150133b6b883 in cling::LookupHelper::findType(llvm::StringRef, cling::LookupHelper::DiagSetting) const () from /cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02883/el8_amd64_gcc12/cms/cmssw-patch/CMSSW_15_1_RNTUPLE_X_2025-03-31-2300/external/el8_amd64_gcc12/lib/libCling.so root-project#13 0x00001501339b6b06 in ROOT::TMetaUtils::TClingLookupHelper::GetPartiallyDesugaredNameWithScopeHandling(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, bool) () from /cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02883/el8_amd64_gcc12/cms/cmssw-patch/CMSSW_15_1_RNTUPLE_X_2025-03-31-2300/external/el8_amd64_gcc12/lib/libCling.so root-project#14 0x00001501422f1458 in ResolveTypedefProcessType(char const*, unsigned int, unsigned int, bool, unsigned int, unsigned int, unsigned int, bool&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) [clone .constprop.0] () from /cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02883/el8_amd64_gcc12/cms/cmssw-patch/CMSSW_15_1_RNTUPLE_X_2025-03-31-2300/external/el8_amd64_gcc12/lib/libCore.so root-project#15 0x00001501422f1a0f in ResolveTypedefImpl(char const*, unsigned int, unsigned int&, bool&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) () from /cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02883/el8_amd64_gcc12/cms/cmssw-patch/CMSSW_15_1_RNTUPLE_X_2025-03-31-2300/external/el8_amd64_gcc12/lib/libCore.so root-project#16 0x00001501422f2ef3 in TClassEdit::ResolveTypedef[abi:cxx11](char const*, bool) () from /cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02883/el8_amd64_gcc12/cms/cmssw-patch/CMSSW_15_1_RNTUPLE_X_2025-03-31-2300/external/el8_amd64_gcc12/lib/libCore.so root-project#17 0x00001501422f5c20 in TClassEdit::TSplitType::ShortType(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, int) () from /cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02883/el8_amd64_gcc12/cms/cmssw-patch/CMSSW_15_1_RNTUPLE_X_2025-03-31-2300/external/el8_amd64_gcc12/lib/libCore.so root-project#18 0x00001501422f6888 in TClassEdit::GetNormalizedName(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, std::basic_string_view<char, std::char_traits<char> >) () from /cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02883/el8_amd64_gcc12/cms/cmssw-patch/CMSSW_15_1_RNTUPLE_X_2025-03-31-2300/external/el8_amd64_gcc12/lib/libCore.so root-project#19 0x000015014232e795 in ROOT::Internal::GetDemangledTypeName[abi:cxx11](std::type_info const&) () from /cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02883/el8_amd64_gcc12/cms/cmssw-patch/CMSSW_15_1_RNTUPLE_X_2025-03-31-2300/external/el8_amd64_gcc12/lib/libCore.so ``` [ntuple] Add tests and a warning for projected Real32(Quant|Trunc) Setting a projected field to quantized or truncated works and read proper data but it doesn't do what one would probably expect. The projected field can correctly read values from any fields that can be read as float, but the value range and bits of precision set on the projected field are silently ignored (since they only make sense for physical columns that are actually stored on disk). To reduce confusion, we now emit a warning if a user tries to call AddProjectedField with a quantized or truncated field. Remove current RHist prototype For a number of reasons, it is not what we want for the future generation of histogram classes in ROOT: * It is templated on the DIMENSIONS, the PRECISION, and optional bin statistics. This makes it hard(er) to use for IO. * The RHist interface has a pointer to an abstract, polymorphic RHistImplBase. * The concrete RHistImpl is templated on the processed axis types. * The polymorphic pointer makes the current prototype incompatible with RNTuple (unless using streamer fields). * It also takes minutes to compile for higher dimensions because concrete RHistImpl have to be generated for all combinations of axis types, which grows exponentially. The plan is to remove the current prototype now, in time for the next ROOT release v6.36, and then add a new implementation after. [hist] reset kAxisRange bit when fully unzooming (root-project#18226) When unzoom with mouse wheel, properly reset kAxisRange bit. Adjust documentation [graf] Patch libAsimage: fp.h is now part of math.h Thanks to @ktf (ALICE) for this fix. [runtime-cxxmodules] Adapt the darwin modulemaps to sdk 15.4. (root-project#18231) * [runtime-cxxmodules] Adapt the darwin modulemaps to sdk 15.4. * [runtime-cxmodules] Use separate modulemap for macOS15.2 * [runtime-cxxmodules] Add overlay entry for MacOSX15.2 --------- Co-authored-by: Devajith Valaparambil Sreeramaswamy <[email protected]> [skip-CI][cling] Refine build and usage guide (root-project#18161) * [cling] Refine build and usage guide Clarified standalone and LLVM-integrated build methods, along with usage instructions. Improved installation steps to ensure successful execution. * [cling] Fix broken link to web page in README Updated the "See also" link in the README to point to the latest version of Cling's web page on GitHack. The previous link referenced a specific commit, which could become outdated. Now, it directly points to the master branch for a more up-to-date reference. * [cling] Improve Cling standalone build instruction Refined the README to provide clearer instructions for building Cling as a standalone project. Updated CMake configuration details, clarified dependency setup, and provided an example command to help users correctly specify LLVM build paths. These improvements aim to make the build process more comprehensible and reduce potential confusion. * [skip-ci] update link to binaries * [skip-ci] fix jupyter link Fixes root-project/cling#527 * [skip-ci] also mention jupyter notebook option see root-project/cling#537 --------- Co-authored-by: ferdymercury <[email protected]> [ntuple] Move RNTupleReader out of Experimental [rfile] Remove current RFile prototype It will replaced by a new prototype after 6.36. The new prototype will go in a different direction by removing the shared ownership between RFile and the application and it won't have RFile inherit from RDirectory. [hist] Add function to get sum of weights including under/overflows Fix root-project#8951 Co-authored-by: Stephan Hageboeck <[email protected]> [cling][JIT] Inject compiler-rt complex division symbols on macOS Clang may emit calls to compiler-rt symbols such as __divdc3 for std::complex<T> division. These may not be resolved during JIT'ing on macOS when using Cling. This patch forward-declares the relevant symbols and explicitly injects them into the JIT symbol table. Similar to: root-project@4b6075b [rbrowser] do not allow to select text in items list [rbrowser] implement items drag and drop Drop handler behaves very similar to drawing with append flag, but does not try to create new widget [rbrowser] let switch between double-click and plain click handler Double-click is ROOT-like style of drawing while single-click is openui5. In last case one also can use keyboard navigation for drawing [rbrowser] Change columns context menu Old functionality deprecated, one need to have something else. Assign to each column headmenu instead [rbrowser] let resize columns via context menu Add 'Resize colums' to context menu [jsroot] dev 4/04/2025 1. Set 'user-select: none' style in drawings to exclude text selection, using `settings.UserSelect` value 2. Better handling of remap of file URL [cmake] Update the version of VDT to 0.4.6 to address the new behaviour of the compiler shipped with XCode 16.3 Properly format the preprocessor if clause following pnggroup/libpng@893b811 [interop] Upgrade to latest, add tag file for diff workflow [ntuple] Mark some CreateEntry const RNTupleReader::CreateEntry() needs to call GetModel(), which is not const. [ntuple] Move RFieldToken out of REntry It will also be used by RRawPtrWriteEntry. [ntuple] Refactor RNTupleFillContext::Fill* ... to avoid code duplication when adding RRawPtrWriteEntry. [ntuple] Implement Detail::RRawPtrWriteEntry It is a container of const raw pointers that can be used to write constant data products in frameworks. Closes root-project#17900 [ntuple] Demonstrate RRawPtrWriteEntry in ntpl014_framework.C [ntuple] Amend documentation on model ID check [tmva][sofie] memory optimization in convK and imcol for ConvTranspose (root-project#18168) * feat: add convK and imcol to memory optimization for ConvTranspose * fix: follow root naming convention for convK and imcol [tmva][sofie] Optimize LayerNormalization operator Do square operation do not use std::pow with base 2 since it is slower than simple multiplication This speeds up evaluation on ATLAS GNN tracking model by 40% Also avoids allocating a small shape vector in LayerNorm and improve indentation of sigmoid operator [TMVA] Disable relevant PyMVA tests if BLAS is not found This commit makes sure that the tests of PyMVA that require BLAS (indirectly via SOFIE) are not run when BLAS is not available. Following up on this PR, which did the same change already for the SOFIE tests: root-project#18065 [CMake] Veto tutorials depending on BLAS if it was not found Closes root-project#16720. Fix a warning when compiling quartz on macos 15.4 with clt 16.3 [tree] Avoid reading from nullptr in TTreeReader. When a TTreeReaderValue is not initialised correctly, it generates an error message. It could, however, inadvertently read a nullptr in doing that. Fix memory leak identified with valgrind in HistFactory histogram reading Apply clang-format [core] improve TDirectory::DecodeNameCycle - avoid scanning the string twice - allow `name` to be null if one only wants the cycle - return the actual name length so the caller can know whether the name was truncated or not - improve function documentation [cppyy] Disable warnings for invalid function casts Some C++ functions defined in CPyCppyy are passed to CPython API, e.g. to build Python methods that use some C++ functionality. This is done by creating a instance of a PyMethodDef struct (https://docs.python.org/3/c-api/structures.html#c.PyMethodDef). One data member of this struct is of type PyCFunction (https://docs.python.org/3/c-api/structures.html#c.PyCFunction), a typedef of a function with signature ``` PyObject *PyCFunction(PyObject *self, PyObject *args); ``` In many cases, the C++ functions that are used as the data member of the PyMethodDef are not directly implemented as PyCFunction, thus need to be cast. This cast is often invalid, since many of such functions do not really respect the function signature prescribed by the API. This pattern is actually encouraged for CPython extension implementations by the official CPython docs (https://docs.python.org/3/extending/extending.html#keyword-parameters-for-extension-functions). As such, the compiler warnings that are generated becausee of the invalid function casts, for example ``` root/bindings/pyroot/cppyy/CPyCppyy/src/Pythonize.cxx:1949:50: warning: cast from 'PyObject *(*)(PyObject *)' (aka '_object *(*)(_object *)') to 'PyCFunction' (aka '_object *(*)(_object *, _object *)') converts to incompatible function type [-Wcast-function-type-mismatch] 1949 | Utility::AddToClass(pyclass, "__repr__", (PyCFunction)ComplexRepr, METH_NOARGS); ``` cannot be avoided and have to be suppressed. This is also done upstream, see wlav/CPyCppyy@33d4a6e Implementing requested changes by @vepadulano [tree] Reset missing proxies list when changing trees. When changing trees while the missing value feature of RDF was in use, the proxies for branches could not get recreated, since TTreeReader refuses the registration when fProxiesSet == true. This lead to the TTreeReaderValue being in a broken state. [tree] Refactor vector of missing proxies to a set. When running over multiple trees, the list of missing proxies in TTreeReader will grow indefinitely. Here, it is refactored to a set, which also shortens the code that looks up the missing proxies. [tree] Include branch name in an error message. Pointed out by Philippe in root-project#18259. [tree] Make test of error messages a bit more rigid. In debugging a UB in TTreeReaderValueBase, it would have been easier to have an explicit note of the expected error messages of that test. Instead of globally suppressing all errors, the three expected message were added here. [tree] Don't dereference a nullptr in TTreeReaderValue test. On mac15 beta, this generated a SIGTRAP, while it was OK on all other platforms, because the reference was never used. But retrieving the pointer instead of dereferencing, the problem seems to go away. [CMake] Restore Python tutorial dependencies. Due to a missing quote, dependencies on Mac15 beta seemed to have gotten deleted. [ntuple] apply I/O rules also to persistent members [ntuple] test I/O rule of persistent member [json] check if map class has dictionary When stream directly std::map object in macro like: ``` std::map<int,string> m; m[1] = "number 1"; m[2] = "number 2"; auto json = TBufferJSON::ToJSON(&m); ``` Real dictionary class for std::map is required. It checked automatically when map is member of user class, but was not checked when map object intself streamed [json] check map dictionary also when read object Same when write object, reading is not possible for std::map<> object without dictionary [json] mention GenerateDictionary for map classes in documentation While std::map uses in TBufferJSON in documentaiton, mention gInterpreter->GenerateDictionary [CMake] Improve handling of RPATH options Some improvements to the handling of RPATH options, which are necessary on my system because I need to add a custom RPATH to make my CUDA package from nix packages findable. 1. Don't set CMake variables to `FALSE` if the default is `FALSE` already. This makes it impossible to change these variables from the CMake user configuration, unnecessarily taking flexibility out of the build system. 2. If `rpath=ON`, ROOT adds the relative path from the binary directory to the lib directory to the RPATH. But it doesn't append it, overriding any `CMAKE_INSTALL_RPATH` that the user might set in the CMake configuration. This commit suggests to append instead. 3. If `rpath=OFF`, ROOT sets `CMAKE_SKIP_INSTALL_RPATH` to `TRUE` without any apparent reason, again, preventing the user from defining the RPATH via `CMAKE_INSTALL_RPATH`. This commit suggests to remove that line. [cppyy] Do not use non-C++ GCC warning Although `bad-function-cast` is present for both Clang and GCC, on the latter it is only used for C and Objective-C code. Using `no-cast-function-type` seems to already disable the PyCFunction-cast-related warnings seen with AppleClang. [ntuple] update RNTupleModel's documentation [math] Ignore vla-cxx-extension in case veccore is active Reintroduce rcanvas_mt.cxx demo with TH1 classes Old macro was used RH1D classes But RCanvas multithreading can be tested without it [rbrowser] reintroduce provider for RCanvas class RBrowser has to know about RCanvas class and which library to load to get access to that class [jsroot] dev 4/04/2025 with RPad fix Fix redraw of RPad primitives Adjust RAxis drawing Adding suggestions from @ferdymercury
pcanal
added a commit
that referenced
this pull request
May 21, 2025
This fixes #18236 As seen in cms-sw/cmssw#47763 (comment) there are cases where the ROOT global lock is taken too late: In the stack trace below the lock is requested on frame #7 where as it should really be (also) requested on frame #12 as soon as the transaction is being generated. ``` #6 0x00001501421f55ea in ROOT::TVirtualRWMutex::Lock() () from /cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02883/el8_amd64_gcc12/cms/cmssw-patch/CMSSW_15_1_RNTUPLE_X_2025-03-31-2300/external/el8_amd64_gcc12/lib/libCore.so #7 0x0000150133a680ca in TCling::HandleNewTransaction(cling::Transaction const&) () from /cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02883/el8_amd64_gcc12/cms/cmssw-patch/CMSSW_15_1_RNTUPLE_X_2025-03-31-2300/external/el8_amd64_gcc12/lib/libCling.so #8 0x0000150133a85778 in TCling::UpdateListsOnCommitted(cling::Transaction const&) () from /cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02883/el8_amd64_gcc12/cms/cmssw-patch/CMSSW_15_1_RNTUPLE_X_2025-03-31-2300/external/el8_amd64_gcc12/lib/libCling.so #9 0x0000150133b60018 in cling::MultiplexInterpreterCallbacks::TransactionCommitted(cling::Transaction const&) () from /cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02883/el8_amd64_gcc12/cms/cmssw-patch/CMSSW_15_1_RNTUPLE_X_2025-03-31-2300/external/el8_amd64_gcc12/lib/libCling.so #10 0x0000150133bec069 in cling::IncrementalParser::commitTransaction(llvm::PointerIntPair<cling::Transaction*, 2u, cling::IncrementalParser::EParseResult, llvm::PointerLikeTypeTraits<cling::Transaction*>, llvm::PointerIntPairInfo<cling::Transaction*, 2u, llvm::PointerLikeTypeTraits<cling::Transaction*> > >&, bool) () from /cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02883/el8_amd64_gcc12/cms/cmssw-patch/CMSSW_15_1_RNTUPLE_X_2025-03-31-2300/external/el8_amd64_gcc12/lib/libCling.so #11 0x0000150133b5663a in cling::Interpreter::PushTransactionRAII::~PushTransactionRAII() () from /cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02883/el8_amd64_gcc12/cms/cmssw-patch/CMSSW_15_1_RNTUPLE_X_2025-03-31-2300/external/el8_amd64_gcc12/lib/libCling.so #12 0x0000150133b6b883 in cling::LookupHelper::findType(llvm::StringRef, cling::LookupHelper::DiagSetting) const () from /cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02883/el8_amd64_gcc12/cms/cmssw-patch/CMSSW_15_1_RNTUPLE_X_2025-03-31-2300/external/el8_amd64_gcc12/lib/libCling.so #13 0x00001501339b6b06 in ROOT::TMetaUtils::TClingLookupHelper::GetPartiallyDesugaredNameWithScopeHandling(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, bool) () from /cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02883/el8_amd64_gcc12/cms/cmssw-patch/CMSSW_15_1_RNTUPLE_X_2025-03-31-2300/external/el8_amd64_gcc12/lib/libCling.so #14 0x00001501422f1458 in ResolveTypedefProcessType(char const*, unsigned int, unsigned int, bool, unsigned int, unsigned int, unsigned int, bool&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) [clone .constprop.0] () from /cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02883/el8_amd64_gcc12/cms/cmssw-patch/CMSSW_15_1_RNTUPLE_X_2025-03-31-2300/external/el8_amd64_gcc12/lib/libCore.so #15 0x00001501422f1a0f in ResolveTypedefImpl(char const*, unsigned int, unsigned int&, bool&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) () from /cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02883/el8_amd64_gcc12/cms/cmssw-patch/CMSSW_15_1_RNTUPLE_X_2025-03-31-2300/external/el8_amd64_gcc12/lib/libCore.so #16 0x00001501422f2ef3 in TClassEdit::ResolveTypedef[abi:cxx11](char const*, bool) () from /cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02883/el8_amd64_gcc12/cms/cmssw-patch/CMSSW_15_1_RNTUPLE_X_2025-03-31-2300/external/el8_amd64_gcc12/lib/libCore.so #17 0x00001501422f5c20 in TClassEdit::TSplitType::ShortType(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, int) () from /cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02883/el8_amd64_gcc12/cms/cmssw-patch/CMSSW_15_1_RNTUPLE_X_2025-03-31-2300/external/el8_amd64_gcc12/lib/libCore.so #18 0x00001501422f6888 in TClassEdit::GetNormalizedName(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, std::basic_string_view<char, std::char_traits<char> >) () from /cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02883/el8_amd64_gcc12/cms/cmssw-patch/CMSSW_15_1_RNTUPLE_X_2025-03-31-2300/external/el8_amd64_gcc12/lib/libCore.so #19 0x000015014232e795 in ROOT::Internal::GetDemangledTypeName[abi:cxx11](std::type_info const&) () from /cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02883/el8_amd64_gcc12/cms/cmssw-patch/CMSSW_15_1_RNTUPLE_X_2025-03-31-2300/external/el8_amd64_gcc12/lib/libCore.so ``` (cherry picked from commit 7c1f0a0)
dpiparo
pushed a commit
that referenced
this pull request
May 22, 2025
This fixes #18236 As seen in cms-sw/cmssw#47763 (comment) there are cases where the ROOT global lock is taken too late: In the stack trace below the lock is requested on frame #7 where as it should really be (also) requested on frame #12 as soon as the transaction is being generated. ``` #6 0x00001501421f55ea in ROOT::TVirtualRWMutex::Lock() () from /cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02883/el8_amd64_gcc12/cms/cmssw-patch/CMSSW_15_1_RNTUPLE_X_2025-03-31-2300/external/el8_amd64_gcc12/lib/libCore.so #7 0x0000150133a680ca in TCling::HandleNewTransaction(cling::Transaction const&) () from /cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02883/el8_amd64_gcc12/cms/cmssw-patch/CMSSW_15_1_RNTUPLE_X_2025-03-31-2300/external/el8_amd64_gcc12/lib/libCling.so #8 0x0000150133a85778 in TCling::UpdateListsOnCommitted(cling::Transaction const&) () from /cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02883/el8_amd64_gcc12/cms/cmssw-patch/CMSSW_15_1_RNTUPLE_X_2025-03-31-2300/external/el8_amd64_gcc12/lib/libCling.so #9 0x0000150133b60018 in cling::MultiplexInterpreterCallbacks::TransactionCommitted(cling::Transaction const&) () from /cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02883/el8_amd64_gcc12/cms/cmssw-patch/CMSSW_15_1_RNTUPLE_X_2025-03-31-2300/external/el8_amd64_gcc12/lib/libCling.so #10 0x0000150133bec069 in cling::IncrementalParser::commitTransaction(llvm::PointerIntPair<cling::Transaction*, 2u, cling::IncrementalParser::EParseResult, llvm::PointerLikeTypeTraits<cling::Transaction*>, llvm::PointerIntPairInfo<cling::Transaction*, 2u, llvm::PointerLikeTypeTraits<cling::Transaction*> > >&, bool) () from /cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02883/el8_amd64_gcc12/cms/cmssw-patch/CMSSW_15_1_RNTUPLE_X_2025-03-31-2300/external/el8_amd64_gcc12/lib/libCling.so #11 0x0000150133b5663a in cling::Interpreter::PushTransactionRAII::~PushTransactionRAII() () from /cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02883/el8_amd64_gcc12/cms/cmssw-patch/CMSSW_15_1_RNTUPLE_X_2025-03-31-2300/external/el8_amd64_gcc12/lib/libCling.so #12 0x0000150133b6b883 in cling::LookupHelper::findType(llvm::StringRef, cling::LookupHelper::DiagSetting) const () from /cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02883/el8_amd64_gcc12/cms/cmssw-patch/CMSSW_15_1_RNTUPLE_X_2025-03-31-2300/external/el8_amd64_gcc12/lib/libCling.so #13 0x00001501339b6b06 in ROOT::TMetaUtils::TClingLookupHelper::GetPartiallyDesugaredNameWithScopeHandling(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, bool) () from /cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02883/el8_amd64_gcc12/cms/cmssw-patch/CMSSW_15_1_RNTUPLE_X_2025-03-31-2300/external/el8_amd64_gcc12/lib/libCling.so #14 0x00001501422f1458 in ResolveTypedefProcessType(char const*, unsigned int, unsigned int, bool, unsigned int, unsigned int, unsigned int, bool&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) [clone .constprop.0] () from /cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02883/el8_amd64_gcc12/cms/cmssw-patch/CMSSW_15_1_RNTUPLE_X_2025-03-31-2300/external/el8_amd64_gcc12/lib/libCore.so #15 0x00001501422f1a0f in ResolveTypedefImpl(char const*, unsigned int, unsigned int&, bool&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) () from /cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02883/el8_amd64_gcc12/cms/cmssw-patch/CMSSW_15_1_RNTUPLE_X_2025-03-31-2300/external/el8_amd64_gcc12/lib/libCore.so #16 0x00001501422f2ef3 in TClassEdit::ResolveTypedef[abi:cxx11](char const*, bool) () from /cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02883/el8_amd64_gcc12/cms/cmssw-patch/CMSSW_15_1_RNTUPLE_X_2025-03-31-2300/external/el8_amd64_gcc12/lib/libCore.so #17 0x00001501422f5c20 in TClassEdit::TSplitType::ShortType(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, int) () from /cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02883/el8_amd64_gcc12/cms/cmssw-patch/CMSSW_15_1_RNTUPLE_X_2025-03-31-2300/external/el8_amd64_gcc12/lib/libCore.so #18 0x00001501422f6888 in TClassEdit::GetNormalizedName(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, std::basic_string_view<char, std::char_traits<char> >) () from /cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02883/el8_amd64_gcc12/cms/cmssw-patch/CMSSW_15_1_RNTUPLE_X_2025-03-31-2300/external/el8_amd64_gcc12/lib/libCore.so #19 0x000015014232e795 in ROOT::Internal::GetDemangledTypeName[abi:cxx11](std::type_info const&) () from /cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02883/el8_amd64_gcc12/cms/cmssw-patch/CMSSW_15_1_RNTUPLE_X_2025-03-31-2300/external/el8_amd64_gcc12/lib/libCore.so ``` (cherry picked from commit 7c1f0a0)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.