Bug 1024958

Summary: HotRodClientException.what() returns dangling pointer
Product: [JBoss] JBoss Data Grid 6 Reporter: Radim Vansa <rvansa>
Component: CPP ClientAssignee: Tristan Tarrant <ttarrant>
Status: VERIFIED --- QA Contact: Alan Field <afield>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.2.0CC: mgencur, sjacobs
Target Milestone: ER5   
Target Release: 6.2.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Radim Vansa 2013-10-30 16:11:23 UTC
The what() method returns c_str() from string allocated on stack (via stringstream). By the time what() returns, the stack is already unwinded.

You have to initialize some string as the exception's field and only return the c_str() from this field.

This may lead to client app crash.