Marten H. van Kerkwijk added the comment:
In astropy we are now working around the auto-closing of the underlying stream
in TextIOWrapper by subclassing and overriding `__del__` to detach [1]. It
would seem more elegant if `TestIOWrapper` (and really, `BufferedReader`) could
gain an
Marten H. van Kerkwijk added the comment:
I should probably have added that the bus error happens on linux. On Windows,
the opening of the file for writing leads to an error, as the file is still
opened for reading inside the mmap.
--
___
Python
New submission from Marten H. van Kerkwijk :
While debugging a strange failure with tests and np.memmap, I realized that the
following direct use of mmap reliably leads to a bus error. Here, obviously
mmap'ing a file, closing it, opening the file for writing but not writing
anything