|
From: | David Come |
Subject: | Re: [certi-dev] Memory issues |
Date: | Fri, 28 Aug 2015 12:54:18 -0700 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 |
Ok, I found the bug. It was obvious, but it seems I'm rustier in C++ than I though. In OwnershipManagement::attributeOwnedByFederate in files RTIA/OwnershipManagement.cc, the return type is const char* The address returned belongs to rep->label. rep is auto_ptr, thus when leaving the function rep goes out of scope and so does label and the address is no longer valid .... I fixed by simply returning a std::string, I'll create a git commit and push it on my github soon. David.
|
[Prev in Thread] | Current Thread | [Next in Thread] |