Bug 92666 - Add a mechanism to dump the stack trace in case of a crash
Summary: Add a mechanism to dump the stack trace in case of a crash
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Template Framework (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Thiago Marcos P. Santos
URL:
Keywords:
Depends on:
Blocks: 92489
  Show dependency treegraph
 
Reported: 2012-07-30 12:33 PDT by Thiago Marcos P. Santos
Modified: 2012-07-31 09:42 PDT (History)
4 users (show)

See Also:


Attachments
Patch (8.12 KB, patch)
2012-07-30 13:57 PDT, Thiago Marcos P. Santos
no flags Details | Formatted Diff | Diff
Patch (8.20 KB, patch)
2012-07-31 07:38 PDT, Thiago Marcos P. Santos
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Thiago Marcos P. Santos 2012-07-30 12:33:07 PDT
Unix based ports can make use of signal handlers to dump the stack trace in case of crashes. This is specially handy when a test fails on the bot without hitting an assertion. We might have a chance to see some insightful information on the bots.
Comment 1 Thiago Marcos P. Santos 2012-07-30 13:57:15 PDT
Created attachment 155353 [details]
Patch
Comment 2 Balazs Kelemen 2012-07-31 02:50:52 PDT
Comment on attachment 155353 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=155353&action=review

Informally LGTM, but I have some naming nits (informally) :)

> Source/WTF/wtf/Assertions.cpp:371
> +static void setupSignalHandlers(void (*handler)(int))

setupSignalHandlersForFatalErrors ?

> Source/WTF/wtf/Assertions.cpp:391
> +void WTFReportBacktraceOnCrash()
> +{

This should have a different name otherwise it's hard to guess what it does at the call site.
WTFSetupReportBactraceOnCrash maybe.
Comment 3 Thiago Marcos P. Santos 2012-07-31 07:38:43 PDT
Created attachment 155532 [details]
Patch

Thanks for the informal review. I'm using now the 'install' prefix like in webInstallExceptionHandler. The function is called xxxxHook to leave it open to non-POSIX ports to implement similar functionality not necessary using signal handlers.
Comment 4 Csaba Osztrogonác 2012-07-31 08:40:25 PDT
Comment on attachment 155532 [details]
Patch

LGTM, r=me.
Comment 5 WebKit Review Bot 2012-07-31 09:42:36 PDT
Comment on attachment 155532 [details]
Patch

Clearing flags on attachment: 155532

Committed r124215: <http://trac.webkit.org/changeset/124215>
Comment 6 WebKit Review Bot 2012-07-31 09:42:40 PDT
All reviewed patches have been landed.  Closing bug.