[issue41085] Array regression test fails

2020-06-23 Thread STINNER Victor


STINNER Victor  added the comment:

That's a bug in array_array_index() which downcasts "Py_ssize_t i" to long:

static PyObject *
array_array_index(arrayobject *self, PyObject *v)
/*[clinic end generated code: output=d48498d325602167 input=cf619898c6649d08]*/
{
Py_ssize_t i;

for (i = 0; i < Py_SIZE(self); i++) {
PyObject *selfi;
int cmp;

selfi = getarrayitem((PyObject *)self, i);
if (selfi == NULL)
return NULL;
cmp = PyObject_RichCompareBool(selfi, v, Py_EQ);
Py_DECREF(selfi);
if (cmp > 0) {
return PyLong_FromLong((long)i); // <= HERE ===
}
else if (cmp < 0)
return NULL;
}
PyErr_SetString(PyExc_ValueError, "array.index(x): x not in array");
return NULL;
}

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41085] Array regression test fails

2020-06-23 Thread STINNER Victor


STINNER Victor  added the comment:

It's Python 3.10 on Windows built in 64-bit with Visual Studio.

Extract of test_output.log:

L:\GIT\cpython\PCbuild>"L:\GIT\cpython\PCbuild\amd64\python_d.exe"  -u -Wd -E 
-bb -m test -u all,-curses -v -M 24Gb --header

== CPython 3.10.0a0 (heads/master-dirty:c96d00e88e, Jun 22 2020, 19:15:48) [MSC 
v.1926 64 bit (AMD64)]
== Windows-10-10.0.19041-SP0 little-endian
== cwd: L:\GIT\cpython\build\test_python_20756
== CPU count: 8
== encodings: locale=cp1252, FS=utf-8
(...)
test_index (test.test_array.LargeArrayTest) ... 
 ... expected peak memory use: 4.2G
FAIL
(...)
==
FAIL: test_index (test.test_array.LargeArrayTest)
--
Traceback (most recent call last):
  File "L:\GIT\cpython\lib\test\support\__init__.py", line 837, in wrapper
return f(self, maxsize)
  File "L:\GIT\cpython\lib\test\test_array.py", line 1460, in test_index
self.assertEqual(example.index(11), size+3)
AssertionError: -2147483645 != 2147483651

--
nosy: +vstinner

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41085] Array regression test fails

2020-06-23 Thread William Pickard


William Pickard  added the comment:

The only modification I made was to "rt.bat" to have the value of '-u' work 
properly.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41085] Array regression test fails

2020-06-22 Thread SilentGhost


SilentGhost  added the comment:

This looks like an overflow failure in a bigmem test (though the given limit 
24Gb should accommodate that?). Do bigmem tests work on Windows?

William, you've made some sort of modifications to the versioned files, what 
are those?

--
components: +Windows
nosy: +SilentGhost, paul.moore, steve.dower, tim.golden, zach.ware

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41085] Array regression test fails

2020-06-22 Thread William Pickard


New submission from William Pickard :

Here's the verbose stack trace of the failing test:

==
FAIL: test_index (test.test_array.LargeArrayTest)
--
Traceback (most recent call last):
  File "L:\GIT\cpython\lib\test\support\__init__.py", line 837, in wrapper
return f(self, maxsize)
  File "L:\GIT\cpython\lib\test\test_array.py", line 1460, in test_index
self.assertEqual(example.index(11), size+3)
AssertionError: -2147483645 != 2147483651

--
components: Tests
files: test_output.log
messages: 372135
nosy: WildCard65
priority: normal
severity: normal
status: open
title: Array regression test fails
type: behavior
versions: Python 3.10
Added file: https://bugs.python.org/file49257/test_output.log

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com