This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author mark.dickinson
Recipients aimacintyre, mark.dickinson, robrien
Date 2008-09-18.08:23:23
SpamBayes Score 4.5136117e-12
Marked as misclassified No
Message-id <1221726205.23.0.0117737637185.issue3862@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2008-09-18 08:23:25mark.dickinsonsetrecipients: + mark.dickinson, aimacintyre, robrien
2008-09-18 08:23:25mark.dickinsonsetmessageid: <1221726205.23.0.0117737637185.issue3862@psf.upfronthosting.co.za>
2008-09-18 08:23:24mark.dickinsonlinkissue3862 messages
2008-09-18 08:23:23mark.dickinsoncreate