Cross-posting to sqlite-dev....

On Thu, Aug 29, 2013 at 4:56 PM, Stephan Beal <sgb...@googlemail.com> wrote:

> On Thu, Aug 29, 2013 at 10:50 PM, Richard Hipp <d...@sqlite.org> wrote:
>
>> The database corruption was caused by scenario 1.1 at
>> http://www.sqlite.org/howtocorrupt.html.
>>
>
> "Another thread"?
>
>
>> Apparently, file descriptor 2 was closed.  Then SQLite used file
>> descriptor 2 to open a connection to the database file.  Then an assert()
>> failed, wrote to file descriptor 2, and overwrote a portion of the
>> CONCEALED table.  At the beginning of one page of the CONCEALED table we
>> see this text:
>>
>>      fossil: ../m1/src/blob.c:253: blob_str: Assertion
>> `(p)->xRealloc==blobReallocMalloc || (p)->xRealloc=blobReallocStatic'
>> failed.
>>
>
>
> That assertion can be triggered from about a thousand places :/. If you
> can give us a stack trace or tell us what operation triggered it, i can try
> to reproduce it locally.
>
>
It would be nice to fix the cause of the assertion, yes.  But I am
significantly more worried that an assertion firing can overwrite and
corrupt the database file!

Perhaps SQLite should be modified so that it will not accept file
descriptor 0, 1, or 2 for use with a database file?

-- 
D. Richard Hipp
d...@sqlite.org
_______________________________________________
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users

Reply via email to