bugGPSD - Bugs: bug #43949, assert() calls with side effects

 
 

bug #43949: assert() calls with side effects

Submitter:  Zbigniew Chyla <zchyla_nokia>
Submitted:  Wed 07 Jan 2015 03:41:13 PM UTC
   
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  Fixed
Privacy:  Public Assigned to:  esr
Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

Wed 07 Jan 2015 03:41:13 PM UTC, original submission:  

I've found two assert() calls with arguments that contain expressions with side effects. These side effects are file/socket reads/writes.

The first one is "assert(fwrite(…))" inside "gpsmon_hook" (gpsmon.c).
The second one is "assert(funcall != -23)" inside "ignore_return" macro (gpsd.h-tail), which is used with "read(…)" and "write(…)" as arguments.

Zbigniew Chyla <zchyla_nokia>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #32780:  0001-Move-side-effects-out-of-assert.patch added by zchyla_nokia (1KiB - text/x-patch - [PATCH] Move side effects out of assert())

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by esr (Updated the item)
  • -email is unavailable- added by zchyla_nokia (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2015-02-22 esr Open/ClosedOpen Closed
    2015-01-08 esr StatusNone Fixed
        Assigned toNone esr
    2015-01-07 zchyla_nokia Attached File- Added 0001-Move-side-effects-out-of-assert.patch, #32780

    Back to the top

    Powered by Savane 3.13-3230.
    Corresponding source code