SQLite

Check-in [23056532e5]
Login

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

Overview
Comment:Work around an apparent GCC UBSAN bug. See forum thread 1d7c25d4a2d for details.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | trunk
Files: files | file ages | folders
SHA3-256: 23056532e51abcff486e38a3319545e6663b4a855abe1bc443e2cd7e0473748c
User & Date: drh 2025-06-26 18:57:20.534
Context
2025-06-26
18:57
Work around an apparent GCC UBSAN bug. See forum thread 1d7c25d4a2d for details. (Leaf check-in: 23056532e5 user: drh tags: trunk)
2025-06-25
20:42
Minor API doc fixes sent off-list from brickviking. (check-in: cb4d05633a user: stephan tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/btree.c.
8692
8693
8694
8695
8696
8697
8698
8699





8700
8701
8702
8703
8704
8705
8706
  assert( apNew[nNew-1]!=0 );
  put4byte(pRight, apNew[nNew-1]->pgno);

  /* If the sibling pages are not leaves, ensure that the right-child pointer
  ** of the right-most new sibling page is set to the value that was
  ** originally in the same field of the right-most old sibling page. */
  if( (pageFlags & PTF_LEAF)==0 && nOld!=nNew ){
    MemPage *pOld = (nNew>nOld ? apNew : apOld)[nOld-1];





    memcpy(&apNew[nNew-1]->aData[8], &pOld->aData[8], 4);
  }

  /* Make any required updates to pointer map entries associated with
  ** cells stored on sibling pages following the balance operation. Pointer
  ** map entries associated with divider cells are set by the insertCell()
  ** routine. The associated pointer map entries are:







|
>
>
>
>
>







8692
8693
8694
8695
8696
8697
8698
8699
8700
8701
8702
8703
8704
8705
8706
8707
8708
8709
8710
8711
  assert( apNew[nNew-1]!=0 );
  put4byte(pRight, apNew[nNew-1]->pgno);

  /* If the sibling pages are not leaves, ensure that the right-child pointer
  ** of the right-most new sibling page is set to the value that was
  ** originally in the same field of the right-most old sibling page. */
  if( (pageFlags & PTF_LEAF)==0 && nOld!=nNew ){
    MemPage *pOld;
    if( nNew>nOld ){
      pOld = apNew[nOld-1];
    }else{
      pOld = apOld[nOld-1];
    }
    memcpy(&apNew[nNew-1]->aData[8], &pOld->aData[8], 4);
  }

  /* Make any required updates to pointer map entries associated with
  ** cells stored on sibling pages following the balance operation. Pointer
  ** map entries associated with divider cells are set by the insertCell()
  ** routine. The associated pointer map entries are: