New submission from Gagan <ga...@hotmail.com>:
Hello everyone. I am currently trying to compile Python 3.7.x on a MIPS(el, little endian; 32 bit) platform, and I am having issues producing a functioning interpreter to continue the compilation. I have no issue compiling either 2.7.x or 3.6.x versions on this machine, and I am using 3.6.7. here is the dump from the installation: -------- root@DD-WRT:/mnt/work/Python-3.7.2# make platform LD_LIBRARY_PATH=/mnt/work/Python-3.7.2:/lib:/usr/lib:/usr/local/lib:/jffs/lib:/jffs/usr/lib:/jffs/usr/local/lib:/mmc/lib:/mmc/usr/lib:/opt/lib:/opt/usr/lib ./python -E -S -m sysconfig --generate-posix-vars ;\ if test $? -ne 0 ; then \ echo "generate-posix-vars failed" ; \ rm -f ./pybuilddir.txt ; \ exit 1 ; \ fi /bin/sh: line 5: 399 Segmentation fault LD_LIBRARY_PATH=/mnt/work/Python-3.7.2:/lib:/usr/lib:/usr/local/lib:/jffs/lib:/jffs/usr/lib:/jffs/usr/local/lib:/mmc/lib:/mmc/usr/lib:/opt/lib:/opt/usr/lib ./python -E -S -m sysconfig --generate-posix-vars generate-posix-vars failed make: *** [Makefile:604: pybuilddir.txt] Error 1 ----------- and here is the valgrind output.: ----- root@DD-WRT:/mnt/work/Python-3.7.2# valgrind ./python -E -S -m sysconfig --generate-posix-vars ==1246== Memcheck, a memory error detector ==1246== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al. ==1246== Using Valgrind-3.13.0 and LibVEX; rerun with -h for copyright info ==1246== Command: ./python -E -S -m sysconfig --generate-posix-vars ==1246== ==1246== Conditional jump or move depends on uninitialised value(s) ==1246== at 0x401FAF4: ??? (in /lib/ld-2.28.so) ==1246== by 0x400942C: ??? (in /lib/ld-2.28.so) ==1246== ==1246== Conditional jump or move depends on uninitialised value(s) ==1246== at 0x4020104: ??? (in /lib/ld-2.28.so) ==1246== by 0x4020024: ??? (in /lib/ld-2.28.so) ==1246== ==1246== Conditional jump or move depends on uninitialised value(s) ==1246== at 0x4007E94: ??? (in /lib/ld-2.28.so) ==1246== by 0x4007DC4: ??? (in /lib/ld-2.28.so) ==1246== ==1246== Conditional jump or move depends on uninitialised value(s) ==1246== at 0x4020104: ??? (in /lib/ld-2.28.so) ==1246== by 0x400D950: ??? (in /lib/ld-2.28.so) ==1246== Could not find platform dependent libraries <exec_prefix> Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>] ==1246== Conditional jump or move depends on uninitialised value(s) ==1246== at 0x4858AEC: wcslen (vg_replace_strmem.c:1856) ==1246== by 0x4A51CEC: _PyMem_RawWcsdup (obmalloc.c:569) ==1246== by 0x4D15A8C: pymain_wstrdup (main.c:501) ==1246== by 0x4D15A8C: pymain_init_cmdline_argv (main.c:561) ==1246== by 0x4D15A8C: pymain_read_conf (main.c:2024) ==1246== by 0x4D15A8C: pymain_cmdline_impl (main.c:2642) ==1246== by 0x4D15A8C: pymain_cmdline (main.c:2707) ==1246== by 0x4D15A8C: pymain_init (main.c:2748) ==1246== by 0x4D18BA0: pymain_main (main.c:2782) ==1246== by 0x4D1AE04: _Py_UnixMain (main.c:2822) ==1246== by 0x400D88: main (in /tmp/mnt/work/Python-3.7.2/python) ==1246== ==1246== Conditional jump or move depends on uninitialised value(s) ==1246== at 0x4858AEC: wcslen (vg_replace_strmem.c:1856) ==1246== by 0x4A51CEC: _PyMem_RawWcsdup (obmalloc.c:569) ==1246== by 0x4D0D688: copy_wstrlist (main.c:1237) ==1246== by 0x4D171E0: pymain_init_core_argv (main.c:1263) ==1246== by 0x4D171E0: pymain_read_conf_impl (main.c:1955) ==1246== by 0x4D171E0: pymain_read_conf (main.c:2028) ==1246== by 0x4D171E0: pymain_cmdline_impl (main.c:2642) ==1246== by 0x4D171E0: pymain_cmdline (main.c:2707) ==1246== by 0x4D171E0: pymain_init (main.c:2748) ==1246== by 0x4D18BA0: pymain_main (main.c:2782) ==1246== by 0x4D1AE04: _Py_UnixMain (main.c:2822) ==1246== by 0x400D88: main (in /tmp/mnt/work/Python-3.7.2/python) ==1246== ==1246== Conditional jump or move depends on uninitialised value(s) ==1246== at 0x4858AEC: wcslen (vg_replace_strmem.c:1856) ==1246== by 0x4A51CEC: _PyMem_RawWcsdup (obmalloc.c:569) ==1246== by 0x4D0D688: copy_wstrlist (main.c:1237) ==1246== by 0x4D17B78: pymain_cmdline_impl (main.c:2663) ==1246== by 0x4D17B78: pymain_cmdline (main.c:2707) ==1246== by 0x4D17B78: pymain_init (main.c:2748) ==1246== by 0x4D18BA0: pymain_main (main.c:2782) ==1246== by 0x4D1AE04: _Py_UnixMain (main.c:2822) ==1246== by 0x400D88: main (in /tmp/mnt/work/Python-3.7.2/python) ==1246== ==1246== Conditional jump or move depends on uninitialised value(s) ==1246== at 0x4858AEC: wcslen (vg_replace_strmem.c:1856) ==1246== by 0x4A51CEC: _PyMem_RawWcsdup (obmalloc.c:569) ==1246== by 0x4D11C3C: _PyCoreConfig_Copy (main.c:2415) ==1246== by 0x4C9D630: _Py_InitializeCore (pylifecycle.c:847) ==1246== by 0x4D150D4: pymain_init (main.c:2760) ==1246== by 0x4D18BA0: pymain_main (main.c:2782) ==1246== by 0x4D1AE04: _Py_UnixMain (main.c:2822) ==1246== by 0x400D88: main (in /tmp/mnt/work/Python-3.7.2/python) ==1246== ==1246== Conditional jump or move depends on uninitialised value(s) ==1246== at 0x4858AEC: wcslen (vg_replace_strmem.c:1856) ==1246== by 0x4A51CEC: _PyMem_RawWcsdup (obmalloc.c:569) ==1246== by 0x4D0D688: copy_wstrlist (main.c:1237) ==1246== by 0x4D11C9C: _PyCoreConfig_Copy (main.c:2417) ==1246== by 0x4C9D630: _Py_InitializeCore (pylifecycle.c:847) ==1246== by 0x4D150D4: pymain_init (main.c:2760) ==1246== by 0x4D18BA0: pymain_main (main.c:2782) ==1246== by 0x4D1AE04: _Py_UnixMain (main.c:2822) ==1246== by 0x400D88: main (in /tmp/mnt/work/Python-3.7.2/python) ==1246== ==1246== Conditional jump or move depends on uninitialised value(s) ==1246== at 0x4858AEC: wcslen (vg_replace_strmem.c:1856) ==1246== by 0x4A51CEC: _PyMem_RawWcsdup (obmalloc.c:569) ==1246== by 0x4D11C3C: _PyCoreConfig_Copy (main.c:2415) ==1246== by 0x4C9C910: _Py_InitializeCore_impl (pylifecycle.c:711) ==1246== by 0x4C9D820: _Py_InitializeCore (pylifecycle.c:859) ==1246== by 0x4D150D4: pymain_init (main.c:2760) ==1246== by 0x4D18BA0: pymain_main (main.c:2782) ==1246== by 0x4D1AE04: _Py_UnixMain (main.c:2822) ==1246== by 0x400D88: main (in /tmp/mnt/work/Python-3.7.2/python) ==1246== ==1246== Invalid read of size 4 ==1246== at 0x4A4A864: address_in_range (obmalloc.c:1338) ==1246== by 0x4A4A864: pymalloc_free.isra.0 (obmalloc.c:1610) ==1246== by 0x4A4BBF8: _PyObject_Free (obmalloc.c:1815) ==1246== by 0x4A4B160: PyObject_Free (obmalloc.c:640) ==1246== by 0x4A08E04: dictresize (dictobject.c:1196) ==1246== by 0x4A0C66C: insertion_resize (dictobject.c:994) ==1246== by 0x4A0C66C: insertdict (dictobject.c:1038) ==1246== by 0x4A0D084: PyDict_SetItem (dictobject.c:1463) ==1246== by 0x4A946A0: add_operators (typeobject.c:7428) ==1246== by 0x4A946A0: PyType_Ready (typeobject.c:5188) ==1246== by 0x4A3D954: _Py_ReadyTypes (object.c:1713) ==1246== by 0x4C9CA20: _Py_InitializeCore_impl (pylifecycle.c:733) ==1246== by 0x4C9D820: _Py_InitializeCore (pylifecycle.c:859) ==1246== by 0x4D150D4: pymain_init (main.c:2760) ==1246== by 0x4D18BA0: pymain_main (main.c:2782) ==1246== Address 0x58f3010 is 8 bytes before a block of size 1,168 alloc'd ==1246== at 0x484C740: malloc (vg_replace_malloc.c:299) ==1246== by 0x4A4BFA8: PyMem_RawMalloc (obmalloc.c:503) ==1246== by 0x4A4FF80: _PyObject_Malloc (obmalloc.c:1560) ==1246== by 0x4A4B484: PyObject_Malloc (obmalloc.c:616) ==1246== by 0x4A07B34: new_keys_object (dictobject.c:534) ==1246== by 0x4A085C8: dictresize (dictobject.c:1141) ==1246== by 0x4A0C66C: insertion_resize (dictobject.c:994) ==1246== by 0x4A0C66C: insertdict (dictobject.c:1038) ==1246== by 0x4A0D084: PyDict_SetItem (dictobject.c:1463) ==1246== by 0x4A946A0: add_operators (typeobject.c:7428) ==1246== by 0x4A946A0: PyType_Ready (typeobject.c:5188) ==1246== by 0x4A3D920: _Py_ReadyTypes (object.c:1710) ==1246== by 0x4C9CA20: _Py_InitializeCore_impl (pylifecycle.c:733) ==1246== by 0x4C9D820: _Py_InitializeCore (pylifecycle.c:859) ==1246== ==1246== Invalid read of size 4 ==1246== at 0x4C51A9C: PyErr_SetObject (errors.c:89) ==1246== by 0x4C52394: PyErr_FormatV (errors.c:837) ==1246== by 0x4C525B0: PyErr_Format (errors.c:852) ==1246== by 0x4AB6E8C: find_maxchar_surrogates (unicodeobject.c:1637) ==1246== by 0x4AE3D74: PyUnicode_FromWideChar (unicodeobject.c:2045) ==1246== by 0x4AE5CD0: unicode_decode_locale (unicodeobject.c:3610) ==1246== by 0x4B1C3BC: PyUnicode_DecodeFSDefaultAndSize (unicodeobject.c:3658) ==1246== by 0x4CED434: PyThread_GetInfo (thread.c:216) ==1246== by 0x4CE1C04: _PySys_BeginInit (sysmodule.c:2414) ==1246== by 0x4C9CCE8: _Py_InitializeCore_impl (pylifecycle.c:753) ==1246== by 0x4C9D820: _Py_InitializeCore (pylifecycle.c:859) ==1246== by 0x4D150D4: pymain_init (main.c:2760) ==1246== Address 0x54 is not stack'd, malloc'd or (recently) free'd ==1246== ==1246== ==1246== Process terminating with default action of signal 11 (SIGSEGV) ==1246== Access not within mapped region at address 0x54 ==1246== at 0x4C51A9C: PyErr_SetObject (errors.c:89) ==1246== by 0x4C52394: PyErr_FormatV (errors.c:837) ==1246== by 0x4C525B0: PyErr_Format (errors.c:852) ==1246== by 0x4AB6E8C: find_maxchar_surrogates (unicodeobject.c:1637) ==1246== by 0x4AE3D74: PyUnicode_FromWideChar (unicodeobject.c:2045) ==1246== by 0x4AE5CD0: unicode_decode_locale (unicodeobject.c:3610) ==1246== by 0x4B1C3BC: PyUnicode_DecodeFSDefaultAndSize (unicodeobject.c:3658) ==1246== by 0x4CED434: PyThread_GetInfo (thread.c:216) ==1246== by 0x4CE1C04: _PySys_BeginInit (sysmodule.c:2414) ==1246== by 0x4C9CCE8: _Py_InitializeCore_impl (pylifecycle.c:753) ==1246== by 0x4C9D820: _Py_InitializeCore (pylifecycle.c:859) ==1246== by 0x4D150D4: pymain_init (main.c:2760) ==1246== If you believe this happened as a result of a stack ==1246== overflow in your program's main thread (unlikely but ==1246== possible), you can try to increase the size of the ==1246== main thread stack using the --main-stacksize= flag. ==1246== The main thread stack size used in this run was 8388608. ==1246== ==1246== HEAP SUMMARY: ==1246== in use at exit: 40,028 bytes in 100 blocks ==1246== total heap usage: 197 allocs, 97 frees, 60,589 bytes allocated ==1246== ==1246== LEAK SUMMARY: ==1246== definitely lost: 0 bytes in 0 blocks ==1246== indirectly lost: 0 bytes in 0 blocks ==1246== possibly lost: 0 bytes in 0 blocks ==1246== still reachable: 40,028 bytes in 100 blocks ==1246== suppressed: 0 bytes in 0 blocks ==1246== Rerun with --leak-check=full to see details of leaked memory ==1246== ==1246== For counts of detected and suppressed errors, rerun with: -v ==1246== Use --track-origins=yes to see where uninitialised values come from ==1246== ERROR SUMMARY: 45 errors from 12 contexts (suppressed: 0 from 0) Segmentation fault ------ it seems to me there is an issue with the new Modules/getpath.c Objects/pathconfig.c Modules/main.c compared to the 3.6.x versions? Any help would be appreciated! thank you ---------- components: Interpreter Core messages: 332514 nosy: broly priority: normal severity: normal status: open title: python 3.7.x interpreter segmentation fault (3.6.x/2.7.x compile fine) type: crash versions: Python 3.7 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue35583> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com