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

Bug #383974 reported by Dave Martin
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
wvstreams (Ubuntu)
New
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.

Revision history for this message
Dave Martin (dave-martin-arm) wrote :
Jerone Young (jerone)
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
Revision history for this message
Dave Martin (dave-martin-arm) wrote : Re: [ARM] Invalid use of assert() around expressions with required side-effects (i.e., getcontext())

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

Loïc Minier (lool)
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  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.