Issue1654484

classification
Title: test_builtin memory error strangeness
Type: Severity: normal
Components: Core Versions:
Milestone:
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: cgroves, kzuberi
Priority: normal Keywords:

Created on 2007-02-07.19:28:31 by kzuberi, last changed 2007-02-12.01:43:54 by cgroves.

Messages
msg1417 (view) Author: Khalid Zuberi (kzuberi) Date: 2007-02-07.19:28:31
Don't understand what's going on here. One of the tests in test_builtin deliberately provokes an out of memory error by executing: 

 list(xrange(sys.maxint // 2))

and the test is successful when the resulting MemoryError is caught. This works fine when running the test stand-alone or with regrtest with no options. However, when running regrtest -a the test fails with a java.lang.OutOfMemoryError being raised, ie it doesn't match the MemoryError in the except cause and so isn't caught.

Curiously, simply adding the statement:

 import java.lang.OutOfMemoryError

to the top of test_b1.py causes the test to succeed again even under regrtest -a.  

Observed on trunk with jdk 1.4 & 1.5 on linux.

- kz
msg1418 (view) Author: Charlie Groves (cgroves) Date: 2007-02-07.20:43:48
I was looking at this last night too after seeing it in the 1.4 Windows buildslave.  I can't get it to happen under 1.4 or 1.5 on the Mac, or 1.5 or 6 under Windows.  It I cut regrtest.py down to running just test___all__ and then test_builtin it fails, but not with just test_builtin even from within regrtest.py.
msg1419 (view) Author: Charlie Groves (cgroves) Date: 2007-02-12.01:43:54
fixed in r3102 by pre-initializing the PyJavaClass for java.lang.OutOfMemoryError
History
Date User Action Args
2007-02-07 19:28:31kzubericreate