Open
Description
Crash report
What happened?
# DEV=/dev/foo
# blockdev --getsize64 $DEV
1048576
# tail $DEV
# python3.12 bug.py
Bus error (core dumped)
# tail $DEV
hell#
from mmap import mmap
with open('/dev/foo', 'r+b') as file:
m = mmap(file.fileno(), 1024 ** 2 + 1)
m.seek(1024 ** 2 - 4)
for b in b'hello world!':
m.write(bytes([b]))
I hope you don't mind my reference to Madagascar
CPython versions tested on:
3.12
Operating systems tested on:
Linux
Output from running 'python -VV' on the command line:
Python 3.12.3 (main, Apr 27 2024, 19:00:21) [GCC 11.4.0]