bugSimple C Expat Wrapper - Bugs: bug #4607, Inappropriate assertions?

 
 

bug #4607: Inappropriate assertions?

Submitted by:  None
Submitted on:  Sun 03 Aug 2003 09:21:40 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: Fixed
Privacy: PublicAssigned to: Aleix Conchillo Flaqué <aleix>
Open/Closed: Closed

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Sun 07 Oct 2007 09:44:32 AM UTC, comment #2:

Assertions have been cleaned up. Separate builds for debug and release are available. Assertions are only active in debug mode.

Available in next release.

Aleix Conchillo Flaqué <aleix>
Project AdministratorIn charge of this item.
Mon 04 Aug 2003 12:34:21 PM UTC, comment #1:

about the assertions: they will be removed in the next release.

Aleix Conchillo Flaqué <aleix>
Project AdministratorIn charge of this item.
Sun 03 Aug 2003 09:21:40 PM UTC, original submission:

In 0.3.1 attribute_by_index there is an assertion that the index must be within the attribute list bounds (actually the test is only on the upper bound; a negative index will slip through)

In 0.2.1, the function would return NULL

As a result, code that previously used a NULL test on the result, rather than avoiding the call by first checking scew_attribute_count, will fail.

I preferred the old contract, and generally think that assertions should only be used to trap internal errors rather than screw-ups by application code.

Anonymous

 

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

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by aleix (Posted a comment)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 01 Sep 2009 12:06:28 AM UTCaleixOpen/ClosedOpen=>Closed
    Sun 07 Oct 2007 09:44:32 AM UTCaleixStatusNone=>Fixed
    Mon 04 Aug 2003 12:34:20 PM UTCaleixAssigned toNone=>NA

    Back to the top


    Powered by Savane 3.1-cleanup1