Bug 189628 - Don't dump OSRAvailabilityData in Graph::dump because a stale Availability may point to a Node that is already freed
Summary: Don't dump OSRAvailabilityData in Graph::dump because a stale Availability ma...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Saam Barati
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-09-14 13:37 PDT by Saam Barati
Modified: 2018-09-14 16:48 PDT (History)
12 users (show)

See Also:


Attachments
patch (3.55 KB, patch)
2018-09-14 13:53 PDT, Saam Barati
mark.lam: review+
Details | Formatted Diff | Diff
patch for landing (3.81 KB, patch)
2018-09-14 14:00 PDT, Saam Barati
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Saam Barati 2018-09-14 13:37:47 PDT
Otherwise, an Availability may point to a node that was removed from the graph.
Comment 1 Filip Pizlo 2018-09-14 13:39:54 PDT
(In reply to Saam Barati from comment #0)
> Otherwise, an Availability may point to a node that was removed from the
> graph.

Or just not report availability in dumping.

I don't think it's a good idea to have dumping cause us to run an analysis.  We want to be able to dump when debugging.  If there's a bug then computing an analysis may trigger another bug.
Comment 2 Saam Barati 2018-09-14 13:44:04 PDT
<rdar://problem/39481690>
Comment 3 Saam Barati 2018-09-14 13:45:44 PDT
(In reply to Filip Pizlo from comment #1)
> (In reply to Saam Barati from comment #0)
> > Otherwise, an Availability may point to a node that was removed from the
> > graph.
> 
> Or just not report availability in dumping.
> 
> I don't think it's a good idea to have dumping cause us to run an analysis. 
> We want to be able to dump when debugging.  If there's a bug then computing
> an analysis may trigger another bug.

Yeah I'm torn on this. I personally find dumping availability helpful. But I also thought through an issue you're describing here. Making an analysis run in dumping could make other analyses break in weird ways when they may be using the availability data structures.

I think we should just remove the dumping, and if someone needs that data dumped, they can manually hack the dumping code.
Comment 4 Saam Barati 2018-09-14 13:53:01 PDT
Created attachment 349801 [details]
patch
Comment 5 Mark Lam 2018-09-14 13:55:35 PDT
Comment on attachment 349801 [details]
patch

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

r=me

> Source/JavaScriptCore/dfg/DFGGraph.cpp:572
> +            if (false)

Can you make this a static const bool at the top of this file?  It makes it easy to enable by just changing the bool.
Comment 6 Saam Barati 2018-09-14 14:00:28 PDT
Created attachment 349802 [details]
patch for landing

Thanks for the review
Comment 7 WebKit Commit Bot 2018-09-14 16:48:02 PDT
Comment on attachment 349802 [details]
patch for landing

Clearing flags on attachment: 349802

Committed r236022: <https://trac.webkit.org/changeset/236022>
Comment 8 WebKit Commit Bot 2018-09-14 16:48:04 PDT
All reviewed patches have been landed.  Closing bug.