Bugs item #1588287, was opened at 2006-10-31 15:05 Message generated for change (Comment added) made by nnorwitz You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1588287&group_id=5470
Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Parser/Compiler Group: None Status: Closed Resolution: Fixed Priority: 5 Private: No Submitted By: Tom Epperly (tepperly) Assigned to: Neal Norwitz (nnorwitz) Summary: python: Python/ast.c:541: seq_for_testlist: Assertion fails Initial Comment: I 1. downloaded Python 2.5 final wget 'http://www.python.org/ftp/python/2.5/Python-2.5.tar.bz2' 2. edited Python-2.5/Objects/obmalloc.c to uncomment the #define Py_USING_MEMORY_DEBUGGER line (I plan to run valgrind on this installation of Python) 3. ./configure --without-pymalloc --with-pydebug --prefix=/somewhere/python2_5 4. make and then "make install" 5. next I downloaded and extracted numpy-1.0.tar.gz from Sourceforge: http://sourceforge.net/project/showfiles.php?group_id=1369&package_id=175103 When I try to run the setup.py for numpy-1.0, I get an assertion failure. [EMAIL PROTECTED] numpy-1.0]$ python setup.py install Running from numpy source directory. python: Python/ast.c:541: seq_for_testlist: Assertion `((n)->n_type) == 326 || ((n)->n_type) == 318 || ((n)->n_type) == 319 || ((n)->n_type) == 300' failed. Abort [EMAIL PROTECTED] numpy-1.0]$ ---------------------------------------------------------------------- >Comment By: Neal Norwitz (nnorwitz) Date: 2006-11-04 11:36 Message: Logged In: YES user_id=33168 Note: If you change `1,2` to `(1,2)` the assertion won't trigger. ---------------------------------------------------------------------- Comment By: Neal Norwitz (nnorwitz) Date: 2006-11-04 11:33 Message: Logged In: YES user_id=33168 Thanks for the report. My guess was close, the problem was: `1,2`. Committed revision 52621. (2.6) Committed revision 52622. (2.5.1) ---------------------------------------------------------------------- Comment By: Neal Norwitz (nnorwitz) Date: 2006-11-03 11:27 Message: Logged In: YES user_id=33168 Sorry, total brainfart. I saw the pymalloc line above and got that stuck in my mind. You are correct that assertions are only enabled with pydebug. Can you find the python code that causes the assertion to trigger. Once I have a simple test case I should be able to fix the problem fast. If my guess is correct, the code might look something like: `[]` (ie a list or generator expr inside back ticks). ---------------------------------------------------------------------- Comment By: Tom Epperly (tepperly) Date: 2006-11-03 10:58 Message: Logged In: YES user_id=94539 I think using --with-pydebug makes the assert statements live, and the default (--without-pydebug) skips the assert() statements. I think it would take a great deal of time to understand the implementation of Python well enough for me to debug this myself. Sorry, I don't think there is much I can do more than reporting it. ---------------------------------------------------------------------- Comment By: Neal Norwitz (nnorwitz) Date: 2006-11-03 00:48 Message: Logged In: YES user_id=33168 That's weird. This is definitely a non-standard configuration, but it should work. I don't understand why it would matter if using pydebug or not. It shouldn't make a diff. It would take quite a while to setup the same config. Can you debug this further? Either find the python code that's causing the problem or the problem in the C code? My guess is the only way this could happen based on the grammar is a list inside backticks ``. But I couldn't reproduce it. ---------------------------------------------------------------------- Comment By: Tom Epperly (tepperly) Date: 2006-10-31 15:16 Message: Logged In: YES user_id=94539 If I drop the --with-pydebug from the configure line, it runs the NumPy's setup.py without error. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1588287&group_id=5470 _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com