Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

PEP 688: Crash if__release_buffer__ is called while an exception is active #104371

Closed
Assignees
JelleZijlstra
Labels
@JelleZijlstra

Description

@JelleZijlstra
class A:    def __buffer__(self, flags):            return memoryview(bytes(8))    def __release_buffer__(self, view):            pass # do not need to do anything here, just needs to existb = bytearray(8)m = memoryview(b) # now b.extend will raise an exception due to exportsb.extend(A())

In a debug build this crashes withAssertion failed: (!PyErr_Occurred()), function _PyType_Lookup, file typeobject.c, line 4707.

Reported by@chilaxan. I'll work on a fix later today.

Most likely, the fix will be to callPyErr_Fetch/PyErr_Restore around calls to Python__release_buffer__ methods.

Linked PRs

Metadata

Metadata

Assignees

Labels

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions


    [8]ページ先頭

    ©2009-2025 Movatter.jp