> On Dec 12, 2017, at 5:46 AM, Simon Slavin <[email protected]> wrote:
> 
> The stray pointer or array overrun is not in the SQLite code.  It’s in the 
> implementation of memory mapping built into the OS.  So you need to ask 
> yourself whether you trust your OS.

This argument (which is a standard one against using writeable mmap) is about 
_application_ code issuing stray writes. This wasn’t a topic about OS bugs.

I’m not sure I buy the argument anyway. It’s already possible for app code to 
write into SQLite’s buffer cache, which can then be written back to disk, 
corrupting the file. And the buffer cache is located in the malloc heap, which 
is close to application heap blocks, while a mmap’ed database file is likely to 
be somewhere way far away in address space.

> Before you answer that question, you should know that both Windows and macOS 
> have been proved to have serious bugs in their memory mapping code.

This has been brought up several times recently, but I’ve never seen any 
details given about exactly what was wrong with macOS’s mmap implementation. 
Does anyone have a pointer to authoritative information about this?

—Jens
_______________________________________________
sqlite-users mailing list
[email protected]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to