On 04/29/2015 03:39 PM, Scott Robison wrote: > On windows, malloc returns null if the allocation fails. Sqlite detects > this and returns an error. > > On linux, malloc may return a non null yet invalid pointer and only fail > when the memory is accessed because it wasn't really available.
That we're getting a segfault instead of SQLITE_NOMEM is not an SQLite bug. But that SQLite is requesting a ridiculously large allocation (assuming that is what is happening) is less than ideal as well though. Even if it's not technically a "bug". It's just that working around the large allocation in question (if we're right about which one it is) is tricky to do. And tricky to test too. Dan. > > If Sqlite is not at fault when posix APIs lie about file locking, I don't > think Sqlite is responsible when malloc lies about what should be > considered a failed memory allocation which should return null. > On Apr 29, 2015 2:28 AM, "Simon Slavin" <slavins at bigfraud.org> wrote: > >> On 29 Apr 2015, at 9:21am, Scott Robison <scott at casaderobison.com> wrote: >> >>> Personally I don't see it as a bug. A limitation, yes. A different >>> algorithm that requires less ram would remove / change the limit. >> Anything inside the SQLite code which causes a Segfault is a bug. >> Assuming that you're not hacking your OS or messing with SQLite 'black box' >> variables like connections and statements. >> >> Just my humble opinion. I'm not on the development team. >> >> A minimal (either small, or simple to reproduce) repeatable example would >> be welcome. It can even include huge data as long as you can describe a >> way to create crashing data like "Generate a trillion identical rows in >> this table.". >> >> Simon. >> _______________________________________________ >> sqlite-users mailing list >> sqlite-users at mailinglists.sqlite.org >> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users >> > _______________________________________________ > sqlite-users mailing list > sqlite-users at mailinglists.sqlite.org > http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users