widelands-dev team mailing list archive
-
widelands-dev team
-
Mailing list archive
-
Message #13532
Re: [Merge] lp:~widelands-dev/widelands/campaign_data into lp:widelands
This is _not_ UseAfterReturn as I assumed before but UseAfterScope:
Here the examples from the ASAN Docs:
https://github.com/google/sanitizers/wiki/AddressSanitizerExampleUseAfterScope
I did not dind a direkt scopes with brakets { .... } but an expression may be a scope, too.
What about this one?
const char* key_key = (depth + "_" + std::to_string(i)).c_str();
http://www.cplusplus.com/reference/string/string/c_str/ states:
The pointer returned may be invalidated by further calls to
other member functions that modify the object.
Bu the temporary std:string you build here, is destructed right after that call,
as it goes out of scope. Will try o fix this now ... done.
Benedikt/Gun pleas take a look at my commit, (give me a few minutes)
--
https://code.launchpad.net/~widelands-dev/widelands/campaign_data/+merge/343783
Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/campaign_data.
References