[issue12331] lib2to3 and packaging tests fail because they write into protected directory
python272 added the comment: problem exists in python 2.7.2 (should this be reported as a separate issue?) [Python-2.7.2]$ python -m test.regrtest -v test_lib2to3 ... ERROR: test_bom (lib2to3.tests.test_refactor.TestRefactoringTool) ... ERROR: test_crlf_newlines ERROR: test_file_encoding ERROR: test_refactor_file ... e.g., File "/usr/local/lib/python2.7/lib2to3/tests/test_refactor.py", line 194, in check_file_refactoring with open(test_file, "wb") as fp: IOError: [Errno 13] Permission denied: '/usr/local/lib/python2.7/lib2to3/tests/data/fixers/parrot_example.py' ... [test]# ls -l /usr/local/lib/python2.7/lib2to3/tests/data/fixers/parrot_example.py -rw-r--r-- 1 root root 23 2011-07-23 11:48 /usr/local/lib/python2.7/lib2to3/tests/data/fixers/parrot_example.py -- nosy: +python272 ___ Python tracker <http://bugs.python.org/issue12331> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12640] test_ctypes seg fault (test_callback_register_double); armv7; gcc 4.5.1
New submission from python272 :
[meego]$/opt/org.python.python-2.7.2/bin/python -m test.regrtest ...
...
test_callback_register_double
(ctypes.test.test_callbacks.SampleCallbacksTestCase) ... Segmentation fault
this is after a native (not cross-compile) configure; make; make install on
armv7:
== CPython 2.7.2 (default, Jul 25 2011, 11:06:06) [GCC 4.5.1 20100731 (MeeGo
4.5.1-1) [release 4.5-2010.09-1]]
== Linux-2.6.37-24.5.CE-adaptation-n900-armv7l-with-glibc2.4 little-endian
== /tmp/test_python_6700
Testing with flags: sys.flags(debug=0, py3k_warning=0, division_warning=0,
division_new=0, inspect=0, interactive=0, optimize=0, dont_write_bytecode=0,
no_user_site=0, no_site=0, ignore_environment=0, tabcheck=0, verbose=0,
unicode=0, bytes_warning=0)
that is the only regrtest seg fault, but there are several worrisome(?)
failures in test_ctypes:
...
==
FAIL: test_longlongresult (ctypes.test.test_functions.FunctionTestCase)
--
Traceback (most recent call last):
File
"/opt/org.python.python-2.7.2/lib/python2.7/ctypes/test/test_functions.py",
line 167, in test_longlongresult
self.assertEqual(result, 21)
AssertionError: 10L != 21
...
Ran 335 tests in 3.949s
FAILED (failures=17, errors=1, skipped=1)
test test_ctypes failed -- multiple errors occurred
1 test failed:
test_ctypes
a few other test modules have failures, they appear to be less severe:
test_cmath
test_float
#http://bugs.python.org/issue12331
test_lib2to3
test_math
test_pyexpat
test_strtod
=
note: the arm systems i have access to (meego armv7 & android sl4a/py4a) both
natively use python < 2.6.7; forgive my ignorance if 2.7 series is not expected
to be mature on arm. please also forgive if i should have just disabled ctypes
in setup.py as many of the online (cross-compile) instructions suggest:
disabled_module_list.append('_ctypes')
===
test_ctypes for a native build of 2.6.7 does not seg fault, but does have the
same test failures:
...
Ran 327 tests in 3.025s
FAILED (failures=17)
test test_ctypes failed -- multiple errors occurred
1 test failed:
test_ctypes
--
components: Tests
messages: 141131
nosy: python272
priority: normal
severity: normal
status: open
title: test_ctypes seg fault (test_callback_register_double); armv7; gcc 4.5.1
type: crash
versions: Python 2.7
___
Python tracker
<http://bugs.python.org/issue12640>
___
___
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12640] test_ctypes seg fault (test_callback_register_double); armv7; gcc 4.5.1
python272 added the comment:
problem also occurs when built with configure option --with-system-ffi
not sure whether it might be a compiler bug or an invalid test?
some debug output:
[@localhost Python-2.7.2]$ gdb ./python
(gdb) run -Wd -3 -E -tt ./Lib/test/regrtest.py -v test_ctypes
...
test_ushort (ctypes.test.test_callbacks.Callbacks) ... ok
test_callback_register_double
(ctypes.test.test_callbacks.SampleCallbacksTestCase) ...
Program received signal SIGSEGV, Segmentation fault.
0x9998 in ?? ()
(gdb) where
#0 0x9998 in ?? ()
#1 0x40409718 in _testfunc_cbk_reg_double (a=5.5, b=1.1964487668029418e-47,
c=1.001023, d=0, e=1.5999e-05, func=0x999a)
at /home/Python-2.7.2/Modules/_ctypes/_ctypes_test.c:39
#2 0x41edc9a0 in ffi_call_SYSV () from /usr/lib/libffi.so.5
#3 0x4016 in slot_tp_iter (self=Cannot access memory at address 0xffe0
) at Objects/typeobject.c:5579
Backtrace stopped: previous frame inner to this frame (corrupt stack?)
the referenced file snippets:
/home/Python-2.7.2/Modules/_ctypes/_ctypes_test.c
35 EXPORT(double)
36 _testfunc_cbk_reg_double(double a, double b, double c, double d, double
e,
37 double (*func)(double, double, double, double,
double))
38 {
39 return func(a*a, b*b, c*c, d*d, e*e);
/home/Python-2.7.2/Objects/typeobject.c
5567 static PyObject *
5568 slot_tp_iter(PyObject *self)
5569 {
5570 PyObject *func, *res;
5571 static PyObject *iter_str, *getitem_str;
5572
5573 func = lookup_method(self, "__iter__", &iter_str);
5574 if (func != NULL) {
5575 PyObject *args;
5576 args = res = PyTuple_New(0);
5577 if (args != NULL) {
5578 res = PyObject_Call(func, args, NULL);
5579 Py_DECREF(args);
5580 }
5581 Py_DECREF(func);
5582 return res;
5583 }
--
___
Python tracker
<http://bugs.python.org/issue12640>
___
___
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12640] test_ctypes seg fault (test_callback_register_double); armv7; gcc 4.5.1
python272 added the comment: test_ctypes is successful in 2.7.3rc1, armv7l (using --with-system-ffi (3.0.10); i haven't tested w/out that config option) note: Python-2.7.3rc1/Modules/_ctypes/libffi/configure contains this line: VERSION='3.0.10rc0' (2.7.2 has the same line) but upstream libffi 3.0.10 (not rc) has been released for awhile now -- ___ Python tracker <http://bugs.python.org/issue12640> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
