bugPSPP - Bugs: bug #58600, Floating point execption in...

 
 

bug #58600: Floating point execption in create_matrix_reader_from_case_reader

Submitter:  Andrea Fioraldi <andreafioraldi>
Submitted:  Wed 17 Jun 2020 08:57:43 AM UTC
   
 
Category:  Syntax Parser Severity:  5 - Average
Status:  Fixed Assigned to:  None
Open/Closed:  Closed Release:  None
Effort:  0.00
* Mandatory Fields

Add a New Comment Rich Markup
   

Sat 20 Jun 2020 11:55:27 PM UTC, comment #2: 

Thank you for the bug report.  I pushed a fix: https://git.savannah.gnu.org/cgit/pspp.git/commit/?id=626f489031fed0a2837a8aecda8d71878d0d2c80

John: xcalloc() does require its second argument to be positive, please see the details in the commit message above.

Ben Pfaff <blp>
Group administrator
Sat 20 Jun 2020 05:54:06 AM UTC, comment #1: 

I cannot reproduce this. 
And I do not understand why s=0 would cause a problem.  It is a well defined behaviour in gnulib.

John Darrington <jmd>
Group administrator
Wed 17 Jun 2020 08:57:43 AM UTC, original submission:  

In create_matrix_reader_from_case_reader, xalloc is called with s=0 cause the exception.

gdb --args ./pspp -O format=txt -o /dev/null -b fpe


Program received signal SIGFPE, Arithmetic exception.
0x0000000000c843b0 in xcalloc (n=8, s=0) at xmalloc.c:100
100          if (xalloc_oversized (n, s)
(gdb) p s
$1 = 0
(gdb) bt
#0  0x0000000000c843b0 in xcalloc (n=8, s=0) at xmalloc.c:100
#1  0x000000000065d356 in create_matrix_reader_from_case_reader (dict=<optimized out>, in_reader=<optimized out>, vars=<optimized out>, n_vars=<optimized out>) at src/language/data-io/matrix-reader.c:141
#2  0x00000000005aa041 in cmd_factor (lexer=<optimized out>, ds=<optimized out>) at src/language/stats/factor.c:1149
#3  0x00000000004d048c in do_parse_command (lexer=0x602000000990, ds=<optimized out>, state=CMD_STATE_DATA) at src/language/command.c:233
#4  cmd_parse_in_state (lexer=0x602000000990, ds=0x0, state=CMD_STATE_DATA) at src/language/command.c:148
#5  0x00000000004d1ecb in cmd_parse (lexer=<optimized out>, ds=<optimized out>) at src/language/command.c:163
#6  0x00000000004c9df7 in main (argc=<optimized out>, argv=<optimized out>) at src/ui/terminal/main.c:138
(gdb)


Andrea Fioraldi <andreafioraldi>

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #49295:  fpe added by andreafioraldi (4KiB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by blp (Posted a comment)
  • -email is unavailable- added by jmd (Posted a comment)
  • -email is unavailable- added by andreafioraldi (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
    2020-06-20 blp StatusCannot Reproduce Fixed
        Open/ClosedOpen Closed
    2020-06-20 jmd StatusNone Cannot Reproduce
    2020-06-17 andreafioraldi Attached File- Added fpe, #49295

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code