Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: f62b964dead05df1d1ba8d64af3fbb0445919fe1
Ticket: 2800740fffffffffffffffffffffffffffffffff
libtommath crash
User & Date: dgp on 2009-06-03 21:30:56
Changes

  1. assignee changed to: "nobody"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    
    % set x [expr {1<<(2**31-1)}]; concat
    % set x [expr {$x<<(2**31-1)}]; concat
    % set x [expr {$x<<(2**31-1)}]; concat
    % set x [expr {$x<<(2**31-1)}]; concat
    % set x [expr {$x<<(2**31-1)}]; concat
    % set x [expr {$x<<(2**31-1)}]; concat
    % set x [expr {$x<<(2**31-1)}]; concat
    
    Program received signal SIGSEGV, Segmentation fault.
    0x000000000046dfca in TclBN_mp_grow (a=0x7fff9fd04f20, size=536870920)
        at /home/dgp/cvs/tcl8.5/unix/../libtommath/bn_mp_grow.c:48
    48            a->dp[i] = 0;
    (gdb) print a
    $1 = (mp_int *) 0x7fff9fd04f20
    (gdb) print a->dp
    $2 = (mp_digit *) 0x861fc68
    (gdb) print i
    $3 = 460175076
    (gdb) print a->alloc
    $4 = 536870920
    (gdb) print a->dp[i]
    Cannot access memory at address 0xe3cfb388
    (gdb) print size
    $5 = 536870920
    
    Suspect there's been an overflow in the
    second argument to XREALLOC() a few
    lines earlier, and we didn't really request
    as much memory as we actually need.
    
  4. foundin changed to: "None"
  5. is_private changed to: "0"
  6. priority changed to: "5 Medium"
  7. resolution changed to: "None"
  8. status changed to: "Open"
  9. submitter changed to: "dgp"
  10. subsystem changed to: "None"
  11. title changed to: "libtommath crash"
  12. type changed to: "Bug"