This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
The operations Sort and Reverse_Element previously checked for element tampering, instead of for cursor tampering. This is not quite right, since the exception behavior for the vector container must match that for the list container, and the list container checks for cursor tampering in those cases. So we check for cursor tampering here (which will catch more things), instead of for element tampering (which will catch fewer things). It's true that the elements of these vector containers could be safely moved around while (say) an iteration is taking place (iteration only increments the busy counter), and so technically all we would need here is a test for element tampering (indicated by the lock counter), that's simply an artifact of our array-based implementation. Logically these operations require a check for cursor tampering. Tested on x86_64-pc-linux-gnu, committed on trunk 2012-01-30 Matthew Heaney <heaney@adacore.com> * a-convec.adb, a-coinve.adb, a-cobove.adb (Sort, Reverse_Elements): Check for cursor tampering.
Attachment:
difs
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |