Changeset 12076


Ignore:
Timestamp:
May 16, 2009, 6:44:56 PM (10 years ago)
Author:
gz
Message:

r11867 from trunk (bounds checking on non-simple aref/aset)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/working-0711/ccl/level-0/l0-array.lisp

    r10972 r12076  
    524524        (multiple-value-bind (data offset)
    525525                             (%array-header-data-and-offset v)
     526          (unless (typep i 'fixnum)
     527            (report-bad-arg i 'fixnum))
     528          (unless (and (typep i 'fixnum)
     529                       (>= (the fixnum i) 0)
     530                       (< (the fixnum i) (the fixnum (%svref v target::vectorH.physsize-cell))))
     531            (if (not (typep i 'fixnum))
     532              (report-bad-arg i 'fixnum)
     533              (%err-disp $XARROOB i v)))
    526534          (uvref data (+ offset i)))
    527535        (if (= typecode target::subtag-arrayH)
     
    537545        (multiple-value-bind (data offset)
    538546                             (%array-header-data-and-offset v)
     547          (unless (and (typep i 'fixnum)
     548                       (>= (the fixnum i) 0)
     549                       (< (the fixnum i) (the fixnum (%svref v target::vectorH.physsize-cell))))
     550            (if (not (typep i 'fixnum))
     551              (report-bad-arg i 'fixnum)
     552              (%err-disp $XARROOB i v)))
    539553          (setf (uvref data (+ offset i)) new))
    540554        (if (= typecode target::subtag-arrayH)
Note: See TracChangeset for help on using the changeset viewer.