Closed Bug 1534318 Opened 5 years ago Closed 5 years ago

MOZ_CAN_RUN_SCRIPT analysis seems to not catch some invalid arguments

Categories

(Developer Infrastructure :: Source Code Analysis, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1534608

People

(Reporter: bzbarsky, Unassigned)

References

(Blocks 1 open bug)

Details

STEPS TO REPRODUCE:

  1. Annotate nsEventListenerManager::PreHandleEvent as MOZ_CAN_RUN_SCRIPT.
  2. Modify PresShell::EventHandler::DispatchEvent to hold a strong ref to the nsPresContext arg when calling PreHandleEvent.
  3. Run the CanRunScriptChecker analysis.

EXPECTED RESULTS: The "mPresShell->mCurrentEventContent" arg is treated as an invalid arg.

ACTUAL RESULTS: The code passes the analysis.

Flags: needinfo?(bpostelnicu)

Ran into this twice in two days in slightly different contexts and didn't make the connection. :(

Status: NEW → RESOLVED
Closed: 5 years ago
Flags: needinfo?(bpostelnicu)
Resolution: --- → DUPLICATE
Product: Firefox Build System → Developer Infrastructure
You need to log in before you can comment on or make changes to this bug.