Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unexpected interpreter crash #104086

Closed
Eclips4 opened this issue May 2, 2023 · 1 comment
Closed

Unexpected interpreter crash #104086

Eclips4 opened this issue May 2, 2023 · 1 comment
Labels
OS-windows type-crash A hard crash of the interpreter, possibly with a core dump

Comments

@Eclips4
Copy link
Member

Eclips4 commented May 2, 2023

Originally taken from 104057
Minimal reproducible example:

import os


def make_bad_fd():
    file = open("test_file.txt", "wb")
    try:
        return file.fileno()
    finally:
        file.close()



fd = make_bad_fd()
os.write(fd, b"foo")

Error:

"Debug assertion Failed."
File minkernel/ctrs/ucrt/src/appcrt/lowio/write.cpp line 50, expression (_osfile(fh) & FOPEN)

Reproducible only on Windows and debug build of interpreter.
Is it a bug?

@Eclips4 Eclips4 added the type-bug An unexpected behavior, bug, or error label May 2, 2023
@sobolevn sobolevn added type-crash A hard crash of the interpreter, possibly with a core dump and removed type-bug An unexpected behavior, bug, or error labels May 2, 2023
@eryksun
Copy link
Contributor

eryksun commented May 2, 2023

It's not a bug. See my comment on issue #104057.

@eryksun eryksun closed this as completed May 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OS-windows type-crash A hard crash of the interpreter, possibly with a core dump
Projects
None yet
Development

No branches or pull requests

4 participants