Fossil

Check-in [44cf2e9190]
Login

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

Overview
Comment:Fix JSON assert in fossil_print_error() seen when an invalid repository is specified.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | th1-malloc-debugging
Files: files | file ages | folders
SHA3-256: 44cf2e91906e34faa429305a91908cd455b51aee1d39bb602f174fb7cefb6afc
User & Date: mistachkin 2021-03-18 23:31:09.712
Context
2021-03-19
02:49
Be sure to set the default value for the OPTIMIZATIONS nmake macro, i.e. to avoid an expression syntax error. Closed-Leaf check-in: 9c36e6335f user: mistachkin tags: th1-malloc-debugging
2021-03-18
23:31
Fix JSON assert in fossil_print_error() seen when an invalid repository is specified. check-in: 44cf2e9190 user: mistachkin tags: th1-malloc-debugging
22:57
Add compile-time option to enable TH1 memory leak tracking. Also, fix a TH1 memory leak and improve a couple #ifdef's. check-in: e5293dc281 user: mistachkin tags: th1-malloc-debugging
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/printf.c.
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
#ifdef FOSSIL_ENABLE_JSON
  if( g.json.isJsonMode!=0 ){
    /*
    ** Avoid calling into the JSON support subsystem if it
    ** has not yet been initialized, e.g. early SQLite log
    ** messages, etc.
    */
    assert(json_is_bootstrapped_early());
    json_err( 0, z, 1 );
    if( g.isHTTP && !g.json.preserveRc ){
      rc = 0 /* avoid HTTP 500 */;
    }
    if( g.cgiOutput==1 ){
      g.cgiOutput = 2;
      cgi_reply();







|







1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
#ifdef FOSSIL_ENABLE_JSON
  if( g.json.isJsonMode!=0 ){
    /*
    ** Avoid calling into the JSON support subsystem if it
    ** has not yet been initialized, e.g. early SQLite log
    ** messages, etc.
    */
    if( !json_is_bootstrapped_early() ) json_bootstrap_early();
    json_err( 0, z, 1 );
    if( g.isHTTP && !g.json.preserveRc ){
      rc = 0 /* avoid HTTP 500 */;
    }
    if( g.cgiOutput==1 ){
      g.cgiOutput = 2;
      cgi_reply();
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
#ifdef FOSSIL_ENABLE_JSON
  if( g.json.isJsonMode!=0 ){
    /*
    ** Avoid calling into the JSON support subsystem if it
    ** has not yet been initialized, e.g. early SQLite log
    ** messages, etc.
    */
    assert(json_is_bootstrapped_early());
    json_warn( FSL_JSON_W_UNKNOWN, "%s", z );
  }else
#endif
  {
    if( g.cgiOutput==1 ){
      etag_cancel();
      cgi_printf("<p class=\"generalError\">\n%h\n</p>\n", z);







|







1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
#ifdef FOSSIL_ENABLE_JSON
  if( g.json.isJsonMode!=0 ){
    /*
    ** Avoid calling into the JSON support subsystem if it
    ** has not yet been initialized, e.g. early SQLite log
    ** messages, etc.
    */
    if( !json_is_bootstrapped_early() ) json_bootstrap_early();
    json_warn( FSL_JSON_W_UNKNOWN, "%s", z );
  }else
#endif
  {
    if( g.cgiOutput==1 ){
      etag_cancel();
      cgi_printf("<p class=\"generalError\">\n%h\n</p>\n", z);