D 2013-07-17T04:15:54.177 J foundin 3.7.17 J icomment

\r\nIn\sthe\ssrc/vtab.c\sand\sthe\ssqlite3VtabSync\sfunction,\spVtab->zErrMsg\sis\sfreed\swithout\sthen\sbeing\szeroed.\s\sThis\sleads\sto\sa\sdouble-free\serror\scondition\swhen\spVtab->zErrMsg\sis\slater\sexamined,\sfound\snon-zero\sand\sfreed\s(again).\r\n

\r\n

\r\nThe\ssimplest\sway\sto\sreproduce\sthe\sproblem\sis\sto\screate\sa\svirtual\stable\simplementation\sthat\simplements\sxSync.\s\sIn\sxSync,\sset\spVtab->zErrMsg\sto\san\sallocated\sstring\sand\sreturn\san\serror\sresult.\s\sAt\sthe\snext\scallback\sopportunity\s(mine\swas\sin\sxRollback),\spVtab->zErrMsg\swill\sstill\sbe\sset,\swhen\sit\sshould\sbe\szero.\r\n

J login nobody J mimetype text/html J private_contact 0b7db2d1f0a1f832560fad9056d32af23def945a J severity Minor J status Open J title Virtual\sTable\sSync\sfrees\spVtab->zErrMsg\swithout\szeroing J type Code_Defect K 78588b938a11f50207db20e0516e2a0a9a31314a U Z 4b9f19b6e28e6f5edd6d5670516cf134