Control: tag -1 + patch confirmed upstream fixed-upstream

Hello,

please find attached a patch from upstream. He also indicated that he will
release 3.12.1 shortly with the fix.

Cheers,
-- 
Raphaël Hertzog ◈ Writer/Consultant ◈ Debian Developer

Discover the Debian Administrator's Handbook:
→ http://debian-handbook.info/get/
--- Begin Message ---
On 4/7/16, Raphael Hertzog <raph...@ouaza.com> wrote:
> [ CCing an upstream developer of SQlite too ]
>
> When using the default --parallel run, I get many weird
> errors and sometimes even a deadlock. When I run it with --parallel=1,
> I got a segfault.
>

Thanks for the bug report, and for your assistance in getting the
Django tests running!

I can reproduce the problem.  I see that the attached patch fixes the
problem.  You are welcomed to apply this patch to the SQLite 3.12.0
sources and rebuild if you like.  But it might be easier to wait for
3.12.1.

I have now to come up with test cases in C and TCL that cause the same
problem.  That might take a little time.  I also need to spend some
time in analysis to confirm that the patch above really is the correct
fix, and to figure out how this problem managed to get through our
testing and into a release.  Once all that is finished, I'll start a
release cycle for 3.12.1, which should take another 24 hours or so.
-- 
D. Richard Hipp
d...@sqlite.org
Index: src/memjournal.c
==================================================================
--- src/memjournal.c
+++ src/memjournal.c
@@ -87,21 +87,21 @@
   int iChunkOffset;
   FileChunk *pChunk;
 
 #ifdef SQLITE_ENABLE_ATOMIC_WRITE
   if( (iAmt+iOfst)>p->endpoint.iOffset ){
     return SQLITE_IOERR_SHORT_READ;
   }
 #endif
 
   assert( (iAmt+iOfst)<=p->endpoint.iOffset );
-  if( p->readpoint.iOffset!=iOfst || iOfst==0 ){
+  if( p->readpoint.iOffset!=iOfst || iOfst==0 || p->readpoint.pChunk==0 ){
     sqlite3_int64 iOff = 0;
     for(pChunk=p->pFirst; 
         ALWAYS(pChunk) && (iOff+p->nChunkSize)<=iOfst;
         pChunk=pChunk->pNext
     ){
       iOff += p->nChunkSize;
     }
   }else{
     pChunk = p->readpoint.pChunk;
   }


--- End Message ---

Reply via email to