Error when debugging macros can affect control flow

NEW
Unassigned

Status

()

Core
Rewriting and Analysis
8 years ago
4 months ago

People

(Reporter: cjones, Unassigned)

Tracking

(Blocks: 1 bug)

Firefox Tracking Flags

(Not tracked)

Details

It's pretty easy to make this mistake

  if (warning)
    NS_WARNING("warning");
  SomethingImportant();

In debug builds, this does the right thing, but in opt builds, that becomes

  if (warning)
    SomethingImportant();

Oops!

There's a site in dom/plugins/BrowserStreamChild.cpp where I did this, but it's hopefully being fixed by bsmedberg in some upcoming changes.
Actually, NS_WARNING() et al. prevent this from happening.  But I still think it's a useful analysis.  Not sure of the best problem definition and approach.
You need to log in before you can comment on or make changes to this bug.