Menu

#4140 lrepeat lacks overflow protection

obsolete: 8.5.4
closed-fixed
9
2008-09-27
2008-09-26
Don Porter
No

% llength [lrepeat 65536 {*}[lrepeat 65536 a]]
Segmentation fault

Discussion

  • Donal K. Fellows

    • status: open --> closed-fixed
     
  • Donal K. Fellows

    We perhaps ought to make the list allocator less inclined to panic() on a failed allocation of the main array, but that's a more disruptive change. (Added an arbitrary limit instead: [lrepeat] won't try to allocate more than 2GB on 32-bit machines now.)

     
MongoDB Logo MongoDB