Message73367
Thanks, Alan. I realised my answer was a shallow one after reading (too
late!) the thread you started on python-dev.
However, I have a suspicion that that particular array test
(test_alloc_overflow) was merely meant to test the code in
newarrayobject, at around line 427 of arraymodule.c, which looks like:
/* Check for overflow */
if (nbytes / descr->itemsize != (size_t)size) {
return PyErr_NoMemory();
}
and that the test dated from an era when it was fairly safe to assume
that a size_t was at most 32 bits. I'd guess that test_alloc_overflow
was never intended to be a test of OS malloc failure behaviour.
So the array test is wrong, and I think this patch should be applied
anyway. I admit this doesn't help with the much more interesting
question of what's going on with malloc on FreeBSD. |
|
Date |
User |
Action |
Args |
2008-09-18 08:23:25 | mark.dickinson | set | recipients:
+ mark.dickinson, aimacintyre, robrien |
2008-09-18 08:23:25 | mark.dickinson | set | messageid: <1221726205.23.0.0117737637185.issue3862@psf.upfronthosting.co.za> |
2008-09-18 08:23:24 | mark.dickinson | link | issue3862 messages |
2008-09-18 08:23:23 | mark.dickinson | create | |
|