Pawn to king 23
Bugzilla Link | 354 |
Created on | Apr 08, 2007 18:38 |
Resolution | INVALID |
Resolved on | Apr 10, 2007 17:09 |
Version | 1.00beta |
OS | Linux |
Architecture | PC |
Attachments | indexerror.sac |
Extended Description
SAC's array bounds checking is broken. Specifically, although it may check that an array offset lies within the ravel of an array, egregious programming errors can slip through. Consider an array X, of shape [20,30]. These expressions produce results, instead of index errors, even in the presence of -check b: X[ [4, 31] ] X[ [4, -3] ] This behavior is, IM(oh, so H)O, unacceptable semantics for an array language. Presumably, the bounds checking is being performed in idx_sel, when it should be performed as an explicit operation earlier. If IVEO did not split vect2offset operations, then vect2offset would be an ideal place to do this. One possible way to resolve this problem is to leave vect2offset along, introduce an array-bounds Checker-O-Meter node, which can be optimized out of existence when static information allows that. The IVEO split problem remains, as does the "iv - cv" overflow-on-split problem. More coffee is required.