Re: [DynInst_API:] [Dyninst] fix for Test Suite crashes


Date: Thu, 15 Oct 2015 12:55:27 -0500
From: Bill Williams <bill@xxxxxxxxxxx>
Subject: Re: [DynInst_API:] [Dyninst] fix for Test Suite crashes
On 10/15/2015 12:45 PM, Mineeva, Tatyana A wrote:

Hello,

 

I’m trying to build and run Dyninst and the Test Suite. In our lab, tests from test5_1 to test5_9 crash in rewriter mode with the reason Group Teardown.

Dyninst and Test Suite version is 9.0.3, OS is CentOS 7.1, compiler version – gcc 5.1.0.

 

The tests fail with segmentation fault, caused by a function Symbol::getTypedName() from symtabAPI/src/Symbol.C . As far as I can understand, it attempts to create a substring of a string "mangledName_" from the beginning to a first semicolon. But it gets the address of the semicolon from a newly created “working_name” string, then subtracts the address of the "mangledName_". The result (in our case it is usually negative, then cast to unsigned int and becomes really big) is then passed as substring length, causing a segmentation fault.

 

Do I understand correctly that the original intent was to get the address of the semicolon from the "mangledName_" string? I have tested this fix in our lab, it seems to resolve the crashes.

 

You understand correctly, though we also shouldn't be strchr'ing a std::string; we should be using proper C++.

I'll get a patch in and posted. Thanks.

--bw

Best regards,

Tatyana


--------------------------------------------------------------------
Joint Stock Company Intel A/O
Registered legal address: Krylatsky Hills Business Park,
17 Krylatskaya Str., Bldg 4, Moscow 121614,
Russian Federation

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.



_______________________________________________
Dyninst-api mailing list
Dyninst-api@xxxxxxxxxxx
https://lists.cs.wisc.edu/mailman/listinfo/dyninst-api

[← Prev in Thread] Current Thread [Next in Thread→]