/ Check-in [d2f9230c]
Login
SQLite training in Houston TX on 2019-11-05 (details)
Part of the 2019 Tcl Conference

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Make sure the sqlite3_result_pointer() interface does not leave a VM register in an inconsistent state. Fix for ticket [7486aa54b968e9b5]. Test cases are in TH3.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: d2f9230c5c7ad6166e7d2b649f77960fa58b1cb583e529a43882753ab348413c
User & Date: drh 2017-08-24 13:55:46
Context
2017-08-24
15:43
Fixes to documentation about SQLITE_OPEN_URI. check-in: 7ec72314 user: drh tags: trunk
14:04
Make sure the sqlite3_result_pointer() interface does not leave a VM register in an inconsistent state. Fix for ticket [7486aa54b968e9b5]. Test cases are in TH3. check-in: abc7adfd user: drh tags: branch-3.20
13:55
Make sure the sqlite3_result_pointer() interface does not leave a VM register in an inconsistent state. Fix for ticket [7486aa54b968e9b5]. Test cases are in TH3. check-in: d2f9230c user: drh tags: trunk
2017-08-23
23:09
Performance optimization to pageFindSlot() in the b-tree layer. check-in: 59560d07 user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/vdbeapi.c.

394
395
396
397
398
399
400
401

402
403
404
405
406
407
408
  sqlite3_context *pCtx,
  void *pPtr,
  const char *zPType,
  void (*xDestructor)(void*)
){
  Mem *pOut = pCtx->pOut;
  assert( sqlite3_mutex_held(pOut->db->mutex) );
  sqlite3VdbeMemSetNull(pOut);

  sqlite3VdbeMemSetPointer(pOut, pPtr, zPType, xDestructor);
}
void sqlite3_result_subtype(sqlite3_context *pCtx, unsigned int eSubtype){
  Mem *pOut = pCtx->pOut;
  assert( sqlite3_mutex_held(pOut->db->mutex) );
  pOut->eSubtype = eSubtype & 0xff;
  pOut->flags |= MEM_Subtype;







|
>







394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
  sqlite3_context *pCtx,
  void *pPtr,
  const char *zPType,
  void (*xDestructor)(void*)
){
  Mem *pOut = pCtx->pOut;
  assert( sqlite3_mutex_held(pOut->db->mutex) );
  sqlite3VdbeMemRelease(pOut);
  pOut->flags = MEM_Null;
  sqlite3VdbeMemSetPointer(pOut, pPtr, zPType, xDestructor);
}
void sqlite3_result_subtype(sqlite3_context *pCtx, unsigned int eSubtype){
  Mem *pOut = pCtx->pOut;
  assert( sqlite3_mutex_held(pOut->db->mutex) );
  pOut->eSubtype = eSubtype & 0xff;
  pOut->flags |= MEM_Subtype;