Closed Bug 1536825 Opened 10 months ago Closed 10 months ago

Fix the interaction of ignoreTrivials and typechecks in MOZ_CAN_RUN_SCRIPT analysis

Categories

(Firefox Build System :: Source Code Analysis, enhancement)

enhancement
Not set

Tracking

(firefox68 fixed)

RESOLVED FIXED
mozilla68
Tracking Status
firefox68 --- fixed

People

(Reporter: bzbarsky, Assigned: bzbarsky)

References

Details

Attachments

(1 file)

This testcase currently fails to flag the call as invalid:

  MOZ_CAN_RUN_SCRIPT void test6() {
    void* x = new RefCountedBase();
    test2((RefCountedBase*)x);
  }

because when we look at the arg we ignoreTrivials(), which strips the cast off, then start doing typechecks for refcounted things.

Patch coming up.

We need to typecheck the trivials too, not just the final thing after trivials
are stripped, because casts are trivials.

Pushed by bzbarsky@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/7a9888e700cf
Fix the interaction of ignoreTrivials and typechecks in MOZ_CAN_RUN_SCRIPT analysis.  r=andi
Status: NEW → RESOLVED
Closed: 10 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla68
Depends on: 1538030
You need to log in before you can comment on or make changes to this bug.