Thanks to a user of Q4M, I have found a bug that would likely lead to
data corruption on 32bit versions of Q4M. 64bit versions
are unaffected.
Q4M by default uses mmap(2) to read from data files. On
32bit systems, it tries to map max. 1GB per each table into
memory using mmap. When mmap fails to map memory due to low
memory, Q4M falls back to file I/O to read the data.
However there was a bug in handling the response from mmap, that
led to reading corrupt data from database files when mmap(2)
failed after the size of the underlying file was grown / shrunk
by Q4M. And since Q4M writes back the corrupt data into the
database file when rows are being consumed, the bug will likely
destroy the database files.
I have fixed the bug and have uploaded Q4M 0.9.2, into the
prerelease directory at …
[さらに読む]