forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
crazy linker: Fix failure to cleanly unload libraries.
On library load and unload we post callbacks to the main thread to update gdb data. Having the callback run asynchronously on load is okay, and in fact required because the loop that invokes the callback does not run until after library load is complete. However, having it run asynchronously on unload is problematic because the objects manipulated by the callback may have been deleted before the callback is invoked, leading to a crash. Fix by adding the concept of a synchronous callback, so that on unloading a library we wait for the callback to occur before completing the unload process. Note: an unload callback crash may occur in unit tests but not currently in the browser itself. This is because the browser terminates without attempting to cleanly unload its libraries. BUG= Review URL: https://codereview.chromium.org/724823002 Cr-Commit-Position: refs/heads/master@{#304620}
- Loading branch information
simonb
authored and
Commit bot
committed
Nov 18, 2014
1 parent
44b5bff
commit 6d4cd6e
Showing
5 changed files
with
195 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters