[issue13241] llvm-gcc-4.2 miscompiles Python (XCode 4.1 on Mac OS 10.7)

Ronald Oussoren report at bugs.python.org
Wed Jan 11 22:56:05 CET 2012


Ronald Oussoren <ronaldoussoren at mac.com> added the comment:

I've found a bug in the curses module that is causing problems:


diff --git a/Modules/_cursesmodule.c b/Modules/_cursesmodule.c
--- a/Modules/_cursesmodule.c
+++ b/Modules/_cursesmodule.c
@@ -2056,7 +2056,8 @@
     {"encoding",
      (getter)PyCursesWindow_get_encoding,
      (setter)PyCursesWindow_set_encoding,
-     "the typecode character used to create the array"}
+     "the typecode character used to create the array"},
+    {NULL, NULL, NULL, NULL}
 };
 
 /* -------------------------------------------------------*/

That is, there is no sentinel in the PyCursesWindow_getsets list. Shouldn't this cause failures on more platforms than just OSX?

With this patch I can build python 3.3 with clang (as included in Xcode 4.2.1). 

BTW. clang as included with Xcode 4.2.1 seems to build the attached copy of unicode.c without problems, the gcc command still fails though.

I did run into problems when building outside of the source directory, but that seems to be an unrelated issue.

----------
keywords: +needs review, patch
Added file: http://bugs.python.org/file24206/issue13241.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue13241>
_______________________________________


More information about the Python-bugs-list mailing list