Skip to content

Crashes in Debug mode #51

@Joshix-1

Description

@Joshix-1
$ python -Xdev -c "import blake3"
Debug memory block at address p=0x5578bf541160: API 'm'
    1420 bytes originally requested
    The 7 pad bytes at p-7 are FORBIDDENBYTE, as expected.
    The 8 pad bytes at tail=0x5578bf5416ec are FORBIDDENBYTE, as expected.
    Data at p: 62 6c 61 6b 65 33 28 64 ... 62 20 64 6f 63 73 2e 00

Enable tracemalloc to get the memory block allocation traceback

Fatal Python error: _PyMem_DebugRawFree: bad ID: Allocated using API 'm', verified using API 'o'
Python runtime state: initialized

Current thread 0x00007f9032ba0b80 (most recent call first):
  File "<frozen importlib._bootstrap>", line 488 in _call_with_frames_removed
  File "<frozen importlib._bootstrap_external>", line 1320 in create_module
  File "<frozen importlib._bootstrap>", line 813 in module_from_spec
  File "<frozen importlib._bootstrap>", line 921 in _load_unlocked
  File "<frozen importlib._bootstrap>", line 1331 in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 1360 in _find_and_load
  File "/tmp/tmp.KCZU304ajx/venv/lib/python3.13/site-packages/blake3/__init__.py", line 1 in <module>
  File "<frozen importlib._bootstrap>", line 488 in _call_with_frames_removed
  File "<frozen importlib._bootstrap_external>", line 1026 in exec_module
  File "<frozen importlib._bootstrap>", line 935 in _load_unlocked
  File "<frozen importlib._bootstrap>", line 1331 in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 1360 in _find_and_load
  File "<string>", line 1 in <module>

Aborted (core dumped)
$ pip show blake3
Name: blake3
Version: 1.0.0
Summary: Python bindings for the Rust blake3 crate
Home-page: https://github.com/oconnor663/blake3-py
...
$ python --version && uname -mos
Python 3.13.1
Linux x86_64 GNU/Linux

I cannot reproduce it when I install it from source using pip install ..

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions