Bug 187915 - Add some asserts to help diagnose a crash.
Summary: Add some asserts to help diagnose a crash.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Mark Lam
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-07-23 11:36 PDT by Mark Lam
Modified: 2018-07-23 12:33 PDT (History)
7 users (show)

See Also:


Attachments
proposed patch. (2.42 KB, patch)
2018-07-23 11:41 PDT, Mark Lam
msaboff: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Lam 2018-07-23 11:36:37 PDT
<rdar://problem/42508166>
Comment 1 Mark Lam 2018-07-23 11:41:28 PDT
Created attachment 345589 [details]
proposed patch.
Comment 2 Michael Saboff 2018-07-23 11:43:13 PDT
Comment on attachment 345589 [details]
proposed patch.

r=me
Comment 3 Saam Barati 2018-07-23 11:59:46 PDT
Comment on attachment 345589 [details]
proposed patch.

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

> Source/JavaScriptCore/bytecode/CodeBlock.cpp:2424
> +        RELEASE_ASSERT(jitType() == JITCode::BaselineJIT);

why not WTFCrashWithInfo?
Comment 4 Mark Lam 2018-07-23 12:07:09 PDT
(In reply to Saam Barati from comment #3)
> Comment on attachment 345589 [details]
> proposed patch.
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=345589&action=review
> 
> > Source/JavaScriptCore/bytecode/CodeBlock.cpp:2424
> > +        RELEASE_ASSERT(jitType() == JITCode::BaselineJIT);
> 
> why not WTFCrashWithInfo?

I just didn't think to use that.  I'll change this to:
    CRASH_WITH_INFO(type);
Comment 5 Mark Lam 2018-07-23 12:29:44 PDT
(In reply to Mark Lam from comment #4)
> I just didn't think to use that.  I'll change this to:
>     CRASH_WITH_INFO(type);

Make that:
    CRASH_WITH_INFO(bitwise_cast<uintptr_t>(jitCode().get()), type);
Comment 6 Mark Lam 2018-07-23 12:33:32 PDT
Thanks for the reviews.  Landed in r234106: <http://trac.webkit.org/r234106>.