[issue23654] infinite loop in faulthandler._stack_overflow

2015-03-23 Thread Matt Frank
Matt Frank added the comment: This is a patch that turns off the Intel Compiler's optimization for the stack_overflow() function. It turns out that icc doesn't support gcc's __attribute__((optimize(no-optimize-sibling-calls))). Instead I used an ifdef'd intel-specific pragma that turns off

[issue23654] infinite loop in faulthandler._stack_overflow

2015-03-13 Thread Matt Frank
Matt Frank added the comment: Yes, this is currently only a problem with the Intel compiler. The writes to buffer[] are dead (provably won't be ever used) at the point that the recursive call occurs. Actually gcc and llvm can figure this out. Thus all the space allocated for the first call

[issue23652] ifdef uses of EPOLLxxx macros so we can compile on systems that don't have them

2015-03-12 Thread Matt Frank
New submission from Matt Frank: With the LSB (Linux Standard Base) headers for libc Modules/selectmodule.c fails to compile because we have code that uses EPOLLRDNORM, EPOLLRDBAND, EPOLLWRNORM and EPOLLMSG without first checking that they are defined. The patch wraps the five uses

[issue23652] ifdef uses of EPOLLxxx macros so we can compile on systems that don't have them

2015-03-12 Thread Matt Frank
Changes by Matt Frank matthew.i.fr...@intel.com: -- type: - compile error ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23652 ___ ___ Python-bugs

[issue23654] infinite loop in faulthandler._stack_overflow

2015-03-12 Thread Matt Frank
New submission from Matt Frank: When the faulthandler module is compiled at -O3 (the default for non-debug builds) with a compiler that does tailcall optimization the Modules/faulthandler.c:stack_overflow() function may become an infinite loop that does not expand the stack. This puts

[issue20306] Lack of pw_gecos field in Android's struct passwd causes cross-compilation for the pwd module to fail

2015-01-30 Thread Matt Frank
Matt Frank added the comment: Apologies. That last patch includes diffs to generated files (configure and pyconfig.h.in). This version just patches Modules/pwdmodule.c and configure.ac. After applying the patch please run autoheader and autoconf to correctly regenerate configure

[issue16353] add function to os module for getting path to default shell

2014-11-06 Thread Matt Frank
Matt Frank added the comment: In msg174930 Christian Heimes (christian.heimes) wrote: I've tested confstr(CS_PATH) on Linux, Mac OS X, Solaris, HP-UX and BSD. It works and the path to `sh` is always included. In msg230713 Ned Deily(ned.deily) wrote: ignore Lib/macpath.py. [...] OS X uses

[issue16353] add function to os module for getting path to default shell

2014-11-06 Thread Matt Frank
Matt Frank added the comment: In msg230720 Akira Li (akira) wrote: os.defpath is supposed to be ':'+CS_PATH, e.g., look at glibc (C library used on Linux) sysdeps/posix/spawni.c I don't know whether it is possible to change CS_PATH without recompiling every statically linked executable

[issue16255] subrocess.Popen needs /bin/sh but Android only has /system/bin/sh

2014-11-06 Thread Matt Frank
Matt Frank added the comment: Assuming issue16353 is fixed using http://bugs.python.org/file36196/os.get_shell_executable.patch the appropriate way to find the path to the default shell is by calling os.get_shell_executable(). This is the 1-liner patch that uses os.get_shell_executable

[issue22809] Include/graminit.h and Python/graminit.c always rebuilt (breaks cross builds)

2014-11-06 Thread Matt Frank
New submission from Matt Frank: changeset 92496:c2a53aa27cad (issue22359) broke cross builds. (Now make touch; make always tries to rebuild Include/graminit.h and Python/graminit.c by running pgen. But pgen is a host executable and won't run on the build machine during a cross-build.) I

[issue22359] Remove incorrect uses of recursive make

2014-11-06 Thread Matt Frank
Matt Frank added the comment: Sorry, I'm complaining. Cross builds broke. Please see issue22809. -- nosy: +WanderingLogic ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22359

[issue16255] subrocess.Popen needs /bin/sh but Android only has /system/bin/sh

2014-11-05 Thread Matt Frank
Changes by Matt Frank matthew.i.fr...@intel.com: -- nosy: +WanderingLogic ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16255 ___ ___ Python-bugs

[issue16353] add function to os module for getting path to default shell

2014-11-05 Thread Matt Frank
Changes by Matt Frank matthew.i.fr...@intel.com: -- nosy: +WanderingLogic ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16353 ___ ___ Python-bugs

[issue5717] os.defpath includes unix /bin on windows

2014-11-05 Thread Matt Frank
Changes by Matt Frank matthew.i.fr...@intel.com: -- nosy: +WanderingLogic ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5717 ___ ___ Python-bugs

[issue16353] add function to os module for getting path to default shell

2014-11-05 Thread Matt Frank
Matt Frank added the comment: Unfortunately os.defpath seems to be hardcoded. And hardcoded to the wrong value on every system I have looked at, including Linux. Lib/posixpath.py sets defpath=':/bin:/usr/bin' which is _not_ what `getconf CS_PATH` returns on my Linux (the extra

[issue5717] os.defpath includes unix /bin on windows

2014-11-05 Thread Matt Frank
Matt Frank added the comment: os.defpath also seems wrong on Mac (':') and Linux (':/bin:/bin/sh'. The extra ':' at the beginning means the same thing as '.:/bin:/bin/sh' which is probably a security problem. I just started up discussion on http://bugs.python.org/issue16353 (which may

[issue22747] Interpreter fails in initialize on systems where HAVE_LANGINFO_H is undefined

2014-10-31 Thread Matt Frank
Matt Frank added the comment: My platform is the Android command-line shell. Essentially it is like an embedded linux platform with a very quirky partially implemented libc (not glibc). It has no langinfo.h and while it has locale.h, the implementations of setlocale() and localeconv() do

[issue22747] Interpreter fails in initialize on systems where HAVE_LANGINFO_H is undefined

2014-10-31 Thread Matt Frank
Matt Frank added the comment: I am working on using my resources at Intel to put some pressure on Google to fix some of the (many) problems in the Bionic libc. I have a sort of polyfill library that implements locale.h, langinfo.h, as well as the structure definitions for wchar.h

[issue21668] The select and time modules uses libm functions without linking against it

2014-10-27 Thread Matt Frank
Changes by Matt Frank matthew.i.fr...@intel.com: -- nosy: +WanderingLogic Added file: http://bugs.python.org/file37041/audioop_ctypes_test_link_with_libm.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21668

[issue21668] The select and time modules uses libm functions without linking against it

2014-10-27 Thread Matt Frank
Matt Frank added the comment: Additionally, * audioop calls floor() * _ctypes_test calls sqrt() Patch attached. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21668

[issue21668] The select and time modules uses libm functions without linking against it

2014-10-27 Thread Matt Frank
Changes by Matt Frank matthew.i.fr...@intel.com: -- nosy: +freakboy3742 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21668 ___ ___ Python-bugs

[issue20306] Lack of pw_gecos field in Android's struct passwd causes cross-compilation for the pwd module to fail

2014-10-27 Thread Matt Frank
Changes by Matt Frank matthew.i.fr...@intel.com: -- nosy: +freakboy3742 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20306 ___ ___ Python-bugs

[issue21668] The select and time modules uses libm functions without linking against it

2014-10-27 Thread Matt Frank
Matt Frank added the comment: audioop_ctypes_test_link_with_libm.patch + libraries=['m']) Why not using math_libs here? math_libs is defined in detect_modules(). But the _ctypes_test extension is defined in a different function: detect_ctypes(). The other

[issue22747] Interpreter fails in initialize on systems where HAVE_LANGINFO_H is undefined

2014-10-27 Thread Matt Frank
New submission from Matt Frank: On systems where configure is unable to find langinfo.h (or where nl_langinfo() is not defined), configure undefines HAVE_LANGINFO_H in pyconfig.h. Then in pythonrun.c:get_locale_encoding() the call to nl_langinfo() is wrapped in an #ifdef, but the #else path

[issue20306] Lack of pw_gecos field in Android's struct passwd causes cross-compilation for the pwd module to fail

2014-10-24 Thread Matt Frank
Changes by Matt Frank matthew.i.fr...@intel.com: -- nosy: +WanderingLogic ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20306 ___ ___ Python-bugs

[issue20306] Lack of pw_gecos field in Android's struct passwd causes cross-compilation for the pwd module to fail

2014-10-24 Thread Matt Frank
Matt Frank added the comment: Here is shiz's patch extended with the addition to configure.ac. I added the variable HAVE_PASSWD_GECOS_FIELD and the appropriate tests. Luckily this very problem (missing pw_gecos field) is the example used in the autoconf manual (https://www.gnu.org/software