[ROOT-6625] TClass::GetMethod() segfaults if arguments need complicated evaluation to find type Created: 29/Aug/14  Updated: 20/Nov/14  Resolved: 20/Nov/14

Status: Closed
Project: ROOT
Component/s: Cling
Affects Version/s: 6.00.02
Fix Version/s: 6.04.00, 6.02/02

Type: Bug Priority: High
Reporter: Oliver Freyermuth Assignee: Axel Naumann
Resolution: Fixed Votes: 0
Labels: None
Environment:

Gentoo Linux x86_64


Attachments: File methodGet.tar.gz    
Development:

 Description   

Dear ROOTers,

since ROOT 6 (this is with heads/master@v6-00-01-986-gad2282d), the following:

TestObj::Class()->GetMethod("func", "TestObj::kAnswerGood^TestObj::kAnswerBad")->Print();

leads to a segfault with ugly backtrace into cling.
"TestObj::kAnswerGood" is an enum value. As the crash of course happens inside a more complex example (in our software, this is used for bitmasking calibration steps), I have attached a minimal example leading to this issue, a "make && ./mgettest" is sufficient to trigger the stacktrace.

If you want, I can also attach this full backtrace, but I guess you are faster triggering this in your local dev-environment .

Cheers,
Oliver



 Comments   
Comment by Axel Naumann [ 19/Nov/14 ]

Hi Oliver,

I can reproduce this; I know where it comes from. Thanks for your report!

I'll let you know once this is fixed.

Axel.

Comment by Axel Naumann [ 20/Nov/14 ]

Thank you for your report! This is now fixed in the master and v6-02-00-patches; we have a test for it.

Generated at Sat Sep 21 07:28:56 CEST 2019 using Jira 7.13.1#713001-sha1:5e06076c2d215a6f699b7e5c90ab2fae7ba5a1ce.