[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

Gentoo Linux x86_64

Attachments: File methodGet.tar.gz    


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 .


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.


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 Tue Aug 11 06:45:21 CEST 2020 using Jira 8.3.4#803005-sha1:1f96e09b3c60279a408a2ae47be3c745f571388b.