Cloosen-Calories / google-breakpad

Automatically exported from code.google.com/p/google-breakpad
0 stars 0 forks source link

ExceptionHandler class is not handling initialization errors, such as the handler thread not being created. #285

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
This affects the Windows exception handler.

What steps will reproduce the problem?
The constructor of ExceptionHandler calls Initialize, which acquires some
resources, such as a thread to handle the in-process crashes and some other
objects, for instance, the semaphores to synchronize between the handler
thread and the thread that crashed. ExceptionHandler::Initialize is not
handling errors, such as the handler thread not being created. This allows
the calling code to continue, but later on, when handling an exception, the
program will deadlock, waiting for the handler thread to signal back. Since
there was no handler thread in the beginning, then it results in a deadlock.

What is the expected output? What do you see instead?

The expected result in the case where breakpad could not fully initialize
is no handler should be installed at all. Otherwise, breakpad exception
filter will get the error which can't be handled and it results in a deadlock. 

Please use labels and text to provide additional information.

Original issue reported on code.google.com by sor...@gmail.com on 2 Dec 2008 at 6:05

GoogleCodeExporter commented 9 years ago
I'll take a look...

Original comment by madeco...@gmail.com on 2 Dec 2008 at 6:25

GoogleCodeExporter commented 9 years ago
I got a LGTM for the fix, waiting for someone to submit the patch for little 
me...

Original comment by madeco...@gmail.com on 3 Dec 2008 at 3:29

GoogleCodeExporter commented 9 years ago
Fixed in r300.

Original comment by ted.mielczarek on 3 Dec 2008 at 6:31