Issue41085
Created on 2020-06-23 00:44 by WildCard65, last changed 2022-04-11 14:59 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| test_output.log | WildCard65, 2020-06-23 00:44 | Log of tests that were ran at time of upload. | ||
| Pull Requests | |||
|---|---|---|---|
| URL | Status | Linked | Edit |
| PR 21071 | merged | WildCard65, 2020-06-23 11:59 | |
| PR 21076 | merged | miss-islington, 2020-06-23 13:21 | |
| PR 21077 | merged | miss-islington, 2020-06-23 13:21 | |
| Messages (9) | |||
|---|---|---|---|
| msg372135 - (view) | Author: William Pickard (WildCard65) * | Date: 2020-06-23 00:44 | |
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 |
|||
| msg372140 - (view) | Author: SilentGhost (SilentGhost) * | Date: 2020-06-23 05:16 | |
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? |
|||
| msg372153 - (view) | Author: William Pickard (WildCard65) * | Date: 2020-06-23 10:42 | |
The only modification I made was to "rt.bat" to have the value of '-u' work properly. |
|||
| msg372155 - (view) | Author: STINNER Victor (vstinner) * | Date: 2020-06-23 10:47 | |
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 |
|||
| msg372156 - (view) | Author: STINNER Victor (vstinner) * | Date: 2020-06-23 10:47 | |
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;
}
|
|||
| msg372164 - (view) | Author: STINNER Victor (vstinner) * | Date: 2020-06-23 13:21 | |
New changeset 1d3dad5f96ed445b958ec53dfa0d46812f2162d9 by WildCard65 in branch 'master': bpo-41085: Fix array.array.index() on 64-bit Windows (GH-21071) https://github.com/python/cpython/commit/1d3dad5f96ed445b958ec53dfa0d46812f2162d9 |
|||
| msg372166 - (view) | Author: miss-islington (miss-islington) | Date: 2020-06-23 13:40 | |
New changeset c6e24e7420a03a1751004e255a6f6c14265b9ea1 by Miss Islington (bot) in branch '3.8': bpo-41085: Fix array.array.index() on 64-bit Windows (GH-21071) https://github.com/python/cpython/commit/c6e24e7420a03a1751004e255a6f6c14265b9ea1 |
|||
| msg372167 - (view) | Author: miss-islington (miss-islington) | Date: 2020-06-23 13:41 | |
New changeset 92f8b480bab408be09bc1631cf2e0e5a4641b731 by Miss Islington (bot) in branch '3.9': bpo-41085: Fix array.array.index() on 64-bit Windows (GH-21071) https://github.com/python/cpython/commit/92f8b480bab408be09bc1631cf2e0e5a4641b731 |
|||
| msg372175 - (view) | Author: STINNER Victor (vstinner) * | Date: 2020-06-23 14:37 | |
Thanks William Pickard for the bug report and the fix! |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-11 14:59:32 | admin | set | github: 85257 |
| 2020-06-23 14:37:17 | vstinner | set | messages:
+ msg372175 components: + Library (Lib), - Tests, Windows versions: + Python 3.8, Python 3.9 |
| 2020-06-23 13:52:54 | WildCard65 | set | status: open -> closed resolution: fixed stage: patch review -> resolved |
| 2020-06-23 13:41:31 | miss-islington | set | messages: + msg372167 |
| 2020-06-23 13:40:55 | miss-islington | set | messages: + msg372166 |
| 2020-06-23 13:21:51 | miss-islington | set | pull_requests: + pull_request20245 |
| 2020-06-23 13:21:42 | miss-islington | set | nosy:
+ miss-islington pull_requests: + pull_request20244 |
| 2020-06-23 13:21:20 | vstinner | set | messages: + msg372164 |
| 2020-06-23 11:59:05 | WildCard65 | set | keywords:
+ patch stage: patch review pull_requests: + pull_request20240 |
| 2020-06-23 10:48:20 | vstinner | set | title: [easy C] Array regression test fails -> [easy C] array.array.index() method downcasts Py_ssize_t to long |
| 2020-06-23 10:47:55 | vstinner | set | keywords: + newcomer friendly |
| 2020-06-23 10:47:49 | vstinner | set | keywords:
+ easy (C) title: Array regression test fails -> [easy C] Array regression test fails |
| 2020-06-23 10:47:37 | vstinner | set | messages: + msg372156 |
| 2020-06-23 10:47:08 | vstinner | set | nosy:
+ vstinner messages: + msg372155 |
| 2020-06-23 10:42:42 | WildCard65 | set | messages: + msg372153 |
| 2020-06-23 05:16:04 | SilentGhost | set | nosy:
+ paul.moore, tim.golden, SilentGhost, zach.ware, steve.dower messages: + msg372140 components: + Windows |
| 2020-06-23 00:44:44 | WildCard65 | create | |