Invalid use of assert() around expressions with required side-effects (i.e., getcontext())

Bug #383974 reported by Dave Martin on 2009-06-05
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
wvstreams (Ubuntu)
Undecided
Unassigned

Bug Description

If the assertions are compiled out, the calls to getcontext will be compiled out also...
This probably doesn't affect Ubuntu builds, since the package is never built with -DNDEBUG by default (I think).

But strictly speaking it's not correct and it will probably only be a matter of time before it confuses someone (like me :P )

I checked through other uses of assert in the code, and it looks like the only affected code is where assert is used around getcontext calls in utils/wvtask.cc.

The attached patch can work around the issue, though it is not the most elegant possible solution. The fix should also be pushed upstream if it is considered relevant.

Jerone Young (jerone) on 2009-06-05
summary: - Invalid use of assert() around expressions with required side-effects
- (i.e., getcontext())
+ [ARM] Invalid use of assert() around expressions with required side-
+ effects (i.e., getcontext())
tags: added: armel

Note that this issue isn't really ARM-specific. It's a generic C/C++ issue.

Loïc Minier (lool) on 2009-06-09
summary: - [ARM] Invalid use of assert() around expressions with required side-
- effects (i.e., getcontext())
+ Invalid use of assert() around expressions with required side-effects
+ (i.e., getcontext())
tags: removed: armel
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers