You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Compact dict bug on Windows (Visual Studio): if (mp->ma_keys->dk_usable * 3 < other->ma_used * 2) #72248
VS breaks at line Objects/dictobject.c:2339 - ' if (mp->ma_keys->dk_usable * 3 < other->ma_used * 2)'
Can you elaborate? Does the compilation fail? Did you get a crash? What was you doing while getting this error/message?
... Can you please give clues how to reproduce the issue?
Vgr255 commented on Sep 10, 2016
Vgr255mannequin
MannequinAuthor
More actions
I compiled, I got a "Python stopped working" during compiling (but it went on anyway), and then launched it from VS in Debugging mode. I did 'from test import support' and then it crashed. VS said this line was the faulty one, and didn't give me anything else useful (no call stack, no access to locals, etc.). I'm sadly not home until Monday, so I can't further investigate this.
changed the title [-]Python crashes on 'from test import support'[/-][+]Compact dict bug on Windows (Visual Studio): if (mp->ma_keys->dk_usable * 3 < other->ma_used * 2)[/+]on Sep 11, 2016
c:\Users\inada-n\work\cpython>PCbuild\win32\python_d.exe -m test.test_dict
..............................................................................
----------------------------------------------------------------------
Ran 78 tests in 1.262s
I noticed I tested win32 mode. I'll rebuild on amd64 mode.
Oh, same questions for you Naoki in fact :-)
I don't know about how to describe exist version of my Windows environment. Is these enough?
Windows 10 Home (with Anniversary Update)
10.0.14393 build 14393
Microsoft Visual Studio Community 2015
Version 14.0.25425.01 Update 3
Microsoft .NET Framework
Version 4.6.01586
Installed Version: Community
Microsoft Visual C++ 2015
cl /?
Microsoft (R) C/C++ Optimizing Compiler Version 19.00.24213.1 for x86
C:\Users\inada-n\work\cpython>PCbuild\win32\python_d.exe
Python 3.6.0a4+ (default, Sep 11 2016, 18:22:14) [MSC v.1900 32 bit (Intel)] on win32
c:\Users\inada-n\work\cpython>PCbuild\amd64\python_d.exe -m test.test_dict
..............................................................................
----------------------------------------------------------------------
Ran 78 tests in 1.498s
OK
c:\Users\inada-n\work\cpython>PCbuild\amd64\python_d.exe
Python 3.6.0a4+ (default, Sep 11 2016, 19:10:48) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
Vgr255 commented on Sep 11, 2016
Vgr255mannequin
MannequinAuthor
More actions
Huh, weird. I'm running a win32 build on a 64 bits machine, with VS2015. I didn't have time to test on a clean checkout, I will do that first thing when I'm back home tonight. I hope I did something wrong and there really isn't any issue :)
I actually did a clean rebuild and could not reproduce, so I'm guessing something did go wrong on my side.
Don't worry. It shouldn't hurt to double or tiple check. I'm not fully confident of this critical change (compact dict). It's good to get any kind of feedback ;-)
Activity
Vgr255 commentedon Sep 10, 2016
VS breaks at line Objects/dictobject.c:2339 - ' if (mp->ma_keys->dk_usable * 3 < other->ma_used * 2)'
I don't have any more useful information; I'm running Windows 7.
methane commentedon Sep 10, 2016
Which hg (or git) revision do you use?
Vgr255 commentedon Sep 10, 2016
Latest, i.e. https://hg.python.org/cpython/rev/a477ef882a16
methane commentedon Sep 10, 2016
According to IRC log, the issue happens on Windows.
And hg revision is a477ef882a16.
I'll try building Python on Windows 10 amd64 in this weekend.
vstinner commentedon Sep 10, 2016
Can you elaborate? Does the compilation fail? Did you get a crash? What was you doing while getting this error/message?
... Can you please give clues how to reproduce the issue?
Vgr255 commentedon Sep 10, 2016
I compiled, I got a "Python stopped working" during compiling (but it went on anyway), and then launched it from VS in Debugging mode. I did 'from test import support' and then it crashed. VS said this line was the faulty one, and didn't give me anything else useful (no call stack, no access to locals, etc.). I'm sadly not home until Monday, so I can't further investigate this.
[-]Python crashes on 'from test import support'[/-][+]Compact dict bug on Windows (Visual Studio): if (mp->ma_keys->dk_usable * 3 < other->ma_used * 2)[/+]methane commentedon Sep 11, 2016
I built acfe53a (git hash). Then:
c:\Users\inada-n\work\cpython>PCbuild\win32\python_d.exe -m test.test_dict
..............................................................................
----------------------------------------------------------------------
Ran 78 tests in 1.262s
OK
vstinner commentedon Sep 11, 2016
Emanuel Barry: What is your Visual Studio (exact) version? I know that there are service packs for VS. What is your Windows version?
vstinner commentedon Sep 11, 2016
Oh, same questions for you Naoki in fact :-) It may help to check if
it's related to VS, Windows or if it's something else.
methane commentedon Sep 11, 2016
I noticed I tested win32 mode. I'll rebuild on amd64 mode.
I don't know about how to describe exist version of my Windows environment. Is these enough?
Windows 10 Home (with Anniversary Update)
10.0.14393 build 14393
Microsoft Visual Studio Community 2015
Version 14.0.25425.01 Update 3
Microsoft .NET Framework
Version 4.6.01586
Installed Version: Community
Microsoft Visual C++ 2015
C:\Users\inada-n\work\cpython>PCbuild\win32\python_d.exe
Python 3.6.0a4+ (default, Sep 11 2016, 18:22:14) [MSC v.1900 32 bit (Intel)] on win32
methane commentedon Sep 11, 2016
amd64 result
c:\Users\inada-n\work\cpython>PCbuild\amd64\python_d.exe -m test.test_dict
..............................................................................
----------------------------------------------------------------------
Ran 78 tests in 1.498s
OK
c:\Users\inada-n\work\cpython>PCbuild\amd64\python_d.exe
Python 3.6.0a4+ (default, Sep 11 2016, 19:10:48) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
Vgr255 commentedon Sep 11, 2016
Huh, weird. I'm running a win32 build on a 64 bits machine, with VS2015. I didn't have time to test on a clean checkout, I will do that first thing when I'm back home tonight. I hope I did something wrong and there really isn't any issue :)
zooba commentedon Sep 11, 2016
It's unlikely, but we also print out the UCRT version at the end of the build process (with a warning if you need to update the WinSDK).
I built and tested a number of times with this change though. If suggest hg purge and rebuild to make sure everything is clean.
vstinner commentedon Sep 12, 2016
I just rebuilt the default Python branch (rev c8851a0ce7ca) on Windows in debug mode and 32-bit: the compilation succeeded and test_dict pass.
Ah, UCRT seems outdated on my PC:
29>------ Rebuild All started: Project: _testbuffer, Configuration: Debug Win32 ------
27> Generating Code...
26> C:\Windows\SYSTEM32\ucrtbased.dll is version 10.0.10150.0
26> WARN: ucrtbased contains known issues. Please update the Windows 10 SDK.
26> See:
26> http://bugs.python.org/issue27705
26> https://developer.microsoft.com/en-US/windows/downloads/windows-10-sdk
vstinner commentedon Sep 12, 2016
I compiled Python in 4 modes:
Compilation never fails and test_dict always pass.
I'm unable to reproduce the issue, so I removed the "release blocker" flag to not stress our release manager :-)
Vgr255 commentedon Sep 12, 2016
I actually did a clean rebuild and could not reproduce, so I'm guessing something did go wrong on my side.
vstinner commentedon Sep 12, 2016
Don't worry. It shouldn't hurt to double or tiple check. I'm not fully confident of this critical change (compact dict). It's good to get any kind of feedback ;-)