[issue26217] Fatal error when importing ``test.test_os`` in debug mode on Windows

2016-01-27 Thread Emanuel Barry

Changes by Emanuel Barry :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26217] Fatal error when importing ``test.test_os`` in debug mode on Windows

2016-01-27 Thread STINNER Victor

STINNER Victor added the comment:

Hum, it looks like resize_compact() clears wstr, but don't reset wstr_length to 
0. Attached patch should fix that.

--
keywords: +patch
nosy: +haypo
Added file: http://bugs.python.org/file41728/wstr_len.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26217] Fatal error when importing ``test.test_os`` in debug mode on Windows

2016-01-27 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 8de6f19afc86 by Victor Stinner in branch '3.5':
Fix resize_compact()
https://hg.python.org/cpython/rev/8de6f19afc86

--
nosy: +python-dev

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26217] Fatal error when importing ``test.test_os`` in debug mode on Windows

2016-01-27 Thread Emanuel Barry

Emanuel Barry added the comment:

This fixed it, thanks!

--
stage:  -> patch review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26217] Fatal error when importing ``test.test_os`` in debug mode on Windows

2016-01-27 Thread Emanuel Barry

New submission from Emanuel Barry:

I compiled CPython from latest trunk on GitHub (revision 
a587bc1eea903dfac94a85324cc6ab39755769a8), compiled with Py_DEBUG and went to 
run the test suite. Here's the (rather long) output:

E:\GitHub\cpython\PCbuild\win32>python_d -m test
== CPython 3.6.0a0 (default, Jan 26 2016, 23:23:12) [MSC v.1900 32 bit (Intel)]
==   Windows-7-6.1.7601-SP1 little-endian
==   hash algorithm: siphash24 32bit
==   E:\GitHub\cpython\build\test_python_464
Testing with flags: sys.flags(debug=0, inspect=0, interactive=0, optimize=0,
dont_write_bytecode=0, no_user_site=0, no_site=0, ignore_environment=0, 
verbose=0,
bytes_warning=0, quiet=0, hash_randomization=1, isolated=0)
[  1/400] test_grammar
[  2/400] test_opcodes
[  3/400] test_dict
[  4/400] test_builtin
[  5/400] test_exceptions
[  6/400] test_types
[  7/400] test_unittest
[  8/400] test_doctest
[  9/400] test_doctest2
[ 10/400] test_support
[ 11/400] test___all__
Assertion failed: compact->wstr_length == 0, file ..\Objects\unicodeobject.c, 
line 427
Fatal Python error: Aborted

Current thread 0x0a88 (most recent call first):
  File "E:\GitHub\cpython\lib\ctypes\util.py", line 64 in find_library
  File "E:\GitHub\cpython\lib\uuid.py", line 473 in 
  File "", line 222 in _call_with_frames_removed
  File "", line 656 in exec_module
  File "", line 673 in _load_unlocked
  File "", line 958 in _find_and_load_unlocked
  File "", line 969 in _find_and_load
  File "E:\GitHub\cpython\lib\test\test_os.py", line 29 in 
  File "", line 222 in _call_with_frames_removed
  File "", line 656 in exec_module
  File "", line 673 in _load_unlocked
  File "", line 958 in _find_and_load_unlocked
  File "", line 969 in _find_and_load
  File "", line 1 in 
  File "E:\GitHub\cpython\lib\test\test___all__.py", line 23 in check_all
  File "E:\GitHub\cpython\lib\test\test___all__.py", line 105 in test_all
  File "E:\GitHub\cpython\lib\unittest\case.py", line 600 in run
  File "E:\GitHub\cpython\lib\unittest\case.py", line 648 in __call__
  File "E:\GitHub\cpython\lib\unittest\suite.py", line 122 in run
  File "E:\GitHub\cpython\lib\unittest\suite.py", line 84 in __call__
  File "E:\GitHub\cpython\lib\unittest\suite.py", line 122 in run
  File "E:\GitHub\cpython\lib\unittest\suite.py", line 84 in __call__
  File "E:\GitHub\cpython\lib\unittest\suite.py", line 122 in run
  File "E:\GitHub\cpython\lib\unittest\suite.py", line 84 in __call__
  File "E:\GitHub\cpython\lib\test\support\__init__.py", line 1679 in run
  File "E:\GitHub\cpython\lib\test\support\__init__.py", line 1780 in _run_suite
  File "E:\GitHub\cpython\lib\test\support\__init__.py", line 1814 in 
run_unittest
  File "E:\GitHub\cpython\lib\test\libregrtest\runtest.py", line 161 in 
test_runner
  File "E:\GitHub\cpython\lib\test\libregrtest\runtest.py", line 162 in 
runtest_inner
  File "E:\GitHub\cpython\lib\test\libregrtest\runtest.py", line 126 in runtest
  File "E:\GitHub\cpython\lib\test\libregrtest\main.py", line 295 in 
run_tests_sequential
  File "E:\GitHub\cpython\lib\test\libregrtest\main.py", line 356 in run_tests
  File "E:\GitHub\cpython\lib\test\libregrtest\main.py", line 392 in main
  File "E:\GitHub\cpython\lib\test\libregrtest\main.py", line 433 in main
  File "E:\GitHub\cpython\lib\test\libregrtest\main.py", line 455 in 
main_in_temp_cwd
  File "E:\GitHub\cpython\lib\test\__main__.py", line 3 in 
  File "E:\GitHub\cpython\lib\runpy.py", line 85 in _run_code
  File "E:\GitHub\cpython\lib\runpy.py", line 184 in _run_module_as_main

E:\GitHub\cpython\PCbuild\win32>python_d
Python 3.6.0a0 (default, Jan 26 2016, 23:23:12) [MSC v.1900 32 bit (Intel)] on 
win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import test.test___all__
>>> import unittest
>>> unittest.main(test.test___all__)

<...>

test.test_openpty
test.test_operator
test.test_optparse
test.test_ordered_dict
test.test_os
Assertion failed: compact->wstr_length == 0, file ..\Objects\unicodeobject.c, 
line 427

E:\GitHub\cpython\PCbuild\win32>python_d
Python 3.6.0a0 (default, Jan 26 2016, 23:23:12) [MSC v.1900 32 bit (Intel)] on 
win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import test.test_os
Assertion failed: compact->wstr_length == 0, file ..\Objects\unicodeobject.c, 
line 427

Call stack (from importing 'test.test_os'):

ucrtbased.dll!0f7d81f0()Unknown
[Frames below may be incorrect and/or missing, no symbols loaded for 
ucrtbased.dll] 
[External Code] 
>   python36_d.dll!_PyUnicode_CheckConsistency(_object * op, int 
> check_content) Line 427C
python36_d.dll!resize_compact(_object * unicode, int length) Line 920   
C
python36_d.dll!unicode_resize(_object * * p_unicode, int length) Line 
1844  C
python36_d.dll!PyUnicode_Append(_object * * p_left, _object * right) 
Line 11301 C
python36_d.dll!unicode_concatenate(_object * v, _object * w, _frame * 
f, unsigned char * next_ins