Repository navigation
New warning: ‘fmt’ may be used uninitialized in this function [-Wmaybe-uninitialized] #116102
Description
Activity
- addedtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
on Feb 29, 2024 I think that there are multiple issues here:
» ./python.exe Python 3.13.0a4+ (heads/main:186fa938766, Feb 29 2024, 13:50:11) [Clang 15.0.0 (clang-1500.0.40.1)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import _xxinterpqueues >>> a = _xxinterpqueues.create(2, 0) >>> _xxinterpqueues.get(a, 'a') ('a', 3) >>> KeyboardInterrupt >>> ^D Assertion failed: (queues->count == 0), function _queues_fini, file _xxinterpqueuesmodule.c, line 689. [1] 57640 abort ./python.exe- Why
('a', 3)is returned?3is not the defaultfmtfor this queue - Why does it crash?
Assertion failed: (queues->count == 0), function _queues_fini, file _xxinterpqueuesmodule.c, line 689.
- Why
- Why
('a', 3)is returned?3is not the defaultfmtfor this queue
It should have raised
QueueEmpty. When run your code locally I getQueueEmpty.- Why does it crash?
Assertion failed: (queues->count == 0), function _queues_fini, file _xxinterpqueuesmodule.c, line 689.
I'm going to look into this.
- Why
I've fixed the warning.
As to "Why does it crash?", it's because the low-level module requires you to call
_xxinterpqueues.destroy(). Note that I didn't really intend for people to use the low-level module directly. If this is a problem, we can address it separately from this issue.@ericsnowcurrently I will open a new one, because I don't have the same result as you with
QueueEmpty:(Reacted by Eric SnowDone: #116239
If this is a problem, we can address it separately from this issue.
Can we call
.destroy()on module shut-down? It might fix this problem.
Tell me to open a new issue if you think that this is worth fixing, though :)Can we call .destroy() on module shut-down? It might fix this problem.
I'm taking care of this in gh-116328.
Reacted by sobolevn and Kirill Podoprigora
Metadata
Metadata
Assignees
Labels
Projects
- StatusShow more project fieldsDone

Bug report
Bug description:
Popped up in https://github.com/python/cpython/pull/116101/files and https://github.com/python/cpython/pull/116096/files
CPython versions tested on:
CPython main branch
Operating systems tested on:
No response
Linked PRs