SQLite

Check-in [64f2cb8dd2]
Login

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

Overview
Comment:Fix a faulty assert() on the benign-malloc controller callback in test_malloc.c.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | malloc-testing
Files: files | file ages | folders
SHA1: 64f2cb8dd2a688db7beb6379d90026b230563ab2
User & Date: drh 2015-09-25 20:18:52.262
Context
2015-09-25
20:18
Fix a faulty assert() on the benign-malloc controller callback in test_malloc.c. (Leaf check-in: 64f2cb8dd2 user: drh tags: malloc-testing)
16:29
Disable the SQLITE_TESTCTRL_BENIGN_MALLOC_HOOKS mechanism and replace it with SQLITE_TESTCTRL_BENIGN_MALLOC_CTRL, which gives better control. (check-in: 2c57b2f386 user: drh tags: malloc-testing)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/test_malloc.c.
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
      assert( memfault.isBenignMode>0 );
      memfault.isBenignMode--;
      break;
    case 1:    /* Enter benign malloc mode */
      memfault.isBenignMode++;
      break;
    case 2:    /* Previous failure is benign */
      assert( memfault.nFail>0 );
      if( memfault.isBenignMode==0 ) memfault.nBenign++;
      break;
  }
}

/*
** Add or remove the fault-simulation layer using sqlite3_config(). If







|







182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
      assert( memfault.isBenignMode>0 );
      memfault.isBenignMode--;
      break;
    case 1:    /* Enter benign malloc mode */
      memfault.isBenignMode++;
      break;
    case 2:    /* Previous failure is benign */
      assert( memfault.nFail>0 || memfault.enable==0 );
      if( memfault.isBenignMode==0 ) memfault.nBenign++;
      break;
  }
}

/*
** Add or remove the fault-simulation layer using sqlite3_config(). If