Title: test_os debug assertion failure
Type: crash Stage:
Components: Windows Versions: Python 3.9
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: ethan smith, paul.moore, steve.dower, tim.golden, zach.ware
Priority: normal Keywords:

Created on 2020-02-25 05:36 by ethan smith, last changed 2020-02-25 10:13 by steve.dower.

Messages (2)
msg362624 - (view) Author: Ethan Smith (ethan smith) * Date: 2020-02-25 05:36
With CPython master branch and build.bat -e -p x64, if I run test_os I get the following (in a messagebox transcribed here for ease of consumption).

Sorry if I am missing something. This means I am unable to run test_os to completion.

I am on Windows 10.0.19559.1000 x64 with CL 19.24.28315/Visual Studio 16.4.3

For test_bad_fd:
Debug Assertion Failed!

Program: C:\Users\ethanhs\cpython\PCbuild\amd64\python_d.exe
File: minkernel\crts\ucrt\src\appcrt\lowio\isatty.cpp
Line: 17

Expression: (fh >= 0 && (unsigned)fh < (unsigned)_nhandle)

For information on how your program can cause an assertion
failure, see the Visual C++ documentation on asserts.

(Press Retry to debug the application)
msg362630 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2020-02-25 10:13
Well, you're running a debug build but building a release build (unless you missed the "-d" from the command line -- "-e" is the default now, BTW), so your build may be out of sync.

These assertion dialogs are supposed to be suppressed during the test suite, but only when run using "python.bat -m test test_os". If you're running the OS tests any other way, then you'll see these popups.

(I hope you used Ctrl+C in the dialog to copy the text, by the way. That's a lot to copy out by hand!)


FWIW, these are very good assertions for most programs. But most programs are not intentionally passing arbitrary values into system calls, so we have to suppress them for Python :)
Date User Action Args
2020-02-25 10:13:15steve.dowersetmessages: + msg362630
2020-02-25 05:36:29ethan smithcreate