Closed Bug 1582599 Opened 5 years ago Closed 3 years ago

[hazards] Compute any/all property sets throughout callgraph

Categories

(Core :: JavaScript: GC, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
95 Branch
Tracking Status
firefox95 --- fixed

People

(Reporter: sfink, Assigned: sfink)

References

(Blocks 2 open bugs)

Details

Attachments

(1 file)

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.

...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.)

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.

Flags: needinfo?(sphink)
Blocks: 1736085
Assignee: nobody → sphink
Status: NEW → ASSIGNED
Pushed by sfink@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/c1643ea5a260
Instead of a single "limits" value ("all paths that can reach this function have this property"), compute both "all" and "any" values: the old "limits" is now "all"; the new "any" means "a path exists to this function in which this... r=jonco
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 95 Branch
Flags: needinfo?(sphink)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: