Fix dangling pointer in forward_ref_die_to_func

Bug: google-breakpad:843
Change-Id: I14358b239604e1faeb5a8c4c4734102571dbed09
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/2951787
Reviewed-by: Mike Frysinger <vapier@chromium.org>
This commit is contained in:
Zequan Wu 2021-06-10 11:09:24 -07:00 committed by Mike Frysinger
parent 322eb2b4c6
commit a524a1e24b
5 changed files with 26 additions and 22 deletions

View file

@ -216,13 +216,8 @@ class Module {
// Add FUNCTION to the module. FUNCTION's name must not be empty.
// This module owns all Function objects added with this function:
// destroying the module destroys them as well.
void AddFunction(Function* function);
// Add all the functions in [BEGIN,END) to the module.
// This module owns all Function objects added with this function:
// destroying the module destroys them as well.
void AddFunctions(vector<Function*>::iterator begin,
vector<Function*>::iterator end);
// Return false if the function is duplicate and needs to be freed.
bool AddFunction(Function* function);
// Add STACK_FRAME_ENTRY to the module.
// This module owns all StackFrameEntry objects added with this