bugPSPP - Bugs: bug #21108, crashing after bad input program

 
 

bug #21108: crashing after bad input program

Submitted by:  John Darrington <jmd>
Submitted on:  Tue 18 Sep 2007 12:36:41 PM UTC  
 
Category: NoneSeverity: 5 - Average
Status: FixedAssigned to: Ben Pfaff <blp>
Open/Closed: ClosedRelease: Before 0.6.0
Effort: 0.00

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Thu 20 Sep 2007 04:50:28 AM UTC, comment #3:

>Looks good to me.


Thanks, I checked it in.

>I wonder if there's a way to auto-generate tests for procedures
>which are likely to share these sort of problems.


I've been wondering for a while whether there's a good way to auto-generate a number of tests. We've had too many bugs of the form "if I combine a couple of incredibly simple things in a particular order, stuff breaks". I think so--I think that it can be done via the model checker library, or perhaps a simpler way. But I haven't yet got around to trying out any of my ideas.

Ben Pfaff <blp>
Project AdministratorIn charge of this item.
Wed 19 Sep 2007 05:39:53 AM UTC, comment #2:

Looks good to me. I wonder if there's a way to auto-generate tests for procedures which are likely to share these sort of problems.

John Darrington <jmd>
Project Administrator
Wed 19 Sep 2007 05:02:55 AM UTC, comment #1:

The problem is this: DATA LIST is looking for BEGIN DATA...END DATA. Not seeing it, it terminates the active file and reports an error. The assertion failure occurs when DESCRIPTIVES, in calc_descriptives, tries to call casereader_peek, which fails, and then returns without destroying the casereader. This particular casereader is actually the active file. Since the active file hasn't been closed when proc_commit tries to verify that it has been, the assertion fails.

The fix is to always destroy the casereader in calc_descriptives, even if the call to casereader_peek fails. The attached patch does this, plus the same thing for several other procedures that shared the problem. Actually, trying to run a procedure with an empty active file would be a good test in general.

(file #13989)

Ben Pfaff <blp>
Project AdministratorIn charge of this item.
Tue 18 Sep 2007 12:36:41 PM UTC, original submission:

This syntax I think is incorrect. But it shouldn't crash ...

input program.
data list list /x.
end file.
end input program.

descriptives x.

John Darrington <jmd>
Project Administrator

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #13989:  input-program-crash.patch added by blp (4KiB - text/x-diff)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by blp (Updated the item)
  • -unavailable- added by jmd (Submitted the item)
  •  

    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 6 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 20 Sep 2007 04:50:28 AM UTCblpStatusReady for Test/Review=>Fixed
      Open/ClosedOpen=>Closed
    Wed 19 Sep 2007 05:02:55 AM UTCblpAttached File-=>Added input-program-crash.patch, #13989
      StatusNone=>Ready for Test/Review
    Tue 18 Sep 2007 04:30:45 PM UTCblpAssigned toNone=>blp
      ReleaseNone=>Before 0.6.0

    Back to the top


    Powered by Savane 3.1-cleanup1