[hazards] Compute any/all property sets throughout callgraph
Categories
(Core :: JavaScript: GC, enhancement, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox95 | --- | fixed |
People
(Reporter: sfink, Assigned: sfink)
References
(Blocks 2 open bugs)
Details
Attachments
(1 file)
(deleted),
text/x-phabricator-request
|
Details |
Currently, the analysis traverses the callgraph to find functions that are always called at times when a certain property is true. The standard example is GC suppression: say you have an RAII scope that suppresses GC, and call function F within that region, and F is never called outside of a GC suppression region. Now when checking F for hazards, nothing should be reported even if F holds a GC pointer live across a supposedly can-GC function G (even if G is called in other contexts where GC is not suppressed.)
Anyway, for that purpose the desired calculation is "is this function only reachable with GC suppressed?", or equivalently "is LIMIT_CANNOT_GC true for all paths to F?"
For other purposes, we might wish to answer "is property X true for any path to F?" The computation procedure is the same, except that when merging two paths, we do OR instead of AND.
I am not currently using this code, but I didn't want to bitrot it, so I have it in my patch stack and it isn't really reorderable.
Assignee | ||
Comment 1•5 years ago
|
||
...property is true". r=jonco
Currently unused, but an example usage would be to enforce a rule where you're supposed to annotate functions as safe, meaning they cannot invoke some function F. We would set a bit for annotated functions. Then if there is any route to F where that bit is set, we know we have a problem. (The currently intended use is a bit more complicated.)
Comment 2•5 years ago
|
||
There's a r+ patch which didn't land and no activity in this bug for 2 weeks.
:sfink, could you have a look please?
For more information, please visit auto_nag documentation.
Updated•3 years ago
|
Comment 4•3 years ago
|
||
bugherder |
Assignee | ||
Updated•3 years ago
|
Description
•