Switch back to std::string in patch to fix a use-after-free#45
Switch back to std::string in patch to fix a use-after-free#45Kenzzer merged 1 commit intoasherkin:masterfrom
Conversation
|
Took me a lot of back and forth to grasp the situation given the PR changes and one line wording, so I'm providing some clarifications below. I disagree with one of the statements from the post
This isn't what's happening, But in any case this isn't what we should focus on, after mulling it over for a few minutes I realised the PR meant line 30 of the patch (which doesn't appear in the changes) name = demangled;
This got me confused for a while because Putting all of this aside, this is awesome work as always @rtldg and you're in all honesty a saviour. This PR demonstrates that extra scrutiny should be put on the breakpad patches, especially the older ones, everytime we move forward the submodule version. |
Kenzzer
left a comment
There was a problem hiding this comment.
Happy new year, and first commit of 2026 for accelerator. Congratulations, and thanks again!
SymbolStringreturns aconst char *so ourauto nameis aconst char *. If thenamewas successfully demangled, then we assignnametodemangled, and then immediately afterfree(demangled).Switching back to using
std::stringresolves this since that duplicates the strings.Popped up after #35 and I only encountered it because of a non-default memory-allocator.