Hello !

I'm writing this here on sqlite lists because I already sent a direct mail to Richard Hipp on 21/10/2017 and to fossil-scm lists on 23/10/2017 and no reply or action so far.

Maybe there is a comunication problem preventing those emails reach the developers.

The test problem is that if we get the source/clone of fossil-scm, compile and run the tests we can see several failures that can be traced to specific commits but they seem to be ignored by the developers or not run at all.

Cheers !

Here is a copy of the message:

=======

Hello Richard !

I found 2 other small bugs in fossil while trying to make it full reentrant, attached is the fixes.

- One of then is a malformed setting "diff-binary" comment that prevents it to be discovered by makeindex.

- The other was causing segfaults because the code on db.c:3267 that is expecting to find a match or a NULL mark to stop looping but there was no explicit NULL mark on the generated settings. The attached patch change makeindex to generate the NULL mark and also decrement the return value of  "setting_info" to allow the binary search work properly (although a comment in code explaining why would be great too).

====

      while( pSetting->name ){ ////////////here is assuming there is a last NULL value mark
        if( exactFlag ){
          if( fossil_strcmp(pSetting->name,zName)!=0 ) break;
        }else{
          if( fossil_strncmp(pSetting->name,zName,n)!=0 ) break;
        }
        print_setting(pSetting);
        pSetting++; /////////advancing the pointer to check for a NULL pointer mark
      }

====

It right now pass all tests the same way the official fossil does.

====

***** End of wiki: 2 errors so far ******
***** Final results: 2 errors out of 35952 tests
***** Considered failures: json-ROrepo-2-1 unversioned-14
***** Ignored results: 8 ignored errors out of 35952 tests
***** Ignored failures: json-cap-POSTenv-name json-RC-1103 json-RC-4103 merge5-sqlite3-issue stash-1-diff stash-WY-1-CODE stash-3-2 stash-3-2-show-1
====

Also running the tests I noticed that for some of then to pass we need to run then outside an open repository and probably the test.tcl should be modified to change to a folder outside the current build/open source tree or be documented to do it manually before run the tests.

The two tests that do not pass I briefly looked at then and on json-ROrepo-2-1 I could not grasp what was the expected result that failed, the unversioned-14 fail on "filenames with spaces" and I'm not sure if the report failing is a missing implementation on fossil to manage it or a warning stating that fossil will not implement it.

Now I'll try to see how to solve the memory/resources leaks that need to be addressed to make it possible to create a library with the core fossil functionality.

Cheers !


bugs.diff


Index: src/db.c
==================================================================
--- src/db.c
+++ src/db.c
@@ -2871,11 +2871,12 @@
 ** SETTING: default-perms   width=16 default=u
 ** Permissions given automatically to new users.  For more
 ** information on permissions see the Users page in Server
 ** Administration of the HTTP UI.
 */
-/* SETTING: diff-binary     boolean default=on
+/*
+** SETTING: diff-binary     boolean default=on
 ** If enabled, permit files that may be binary
 ** or that match the "binary-glob" setting to be used with
 ** external diff programs.  If disabled, skip these files.
 */
 /*

Index: src/dispatch.c
==================================================================
--- src/dispatch.c
+++ src/dispatch.c
@@ -653,8 +653,8 @@
 **
 ** This routine provides access to the aSetting2[] array which is created
 ** by the mkindex utility program and included with <page_index.h>.
 */
 const Setting *setting_info(int *pnCount){
-  if( pnCount ) *pnCount = (int)(sizeof(aSetting)/sizeof(aSetting[0]));
+  if( pnCount ) *pnCount = ((int)(sizeof(aSetting)/sizeof(aSetting[0])))-1;
   return aSetting;
 }

Index: src/mkindex.c
==================================================================
--- src/mkindex.c
+++ src/mkindex.c
@@ -480,10 +480,11 @@
     );
     if( aEntry[i].zIf ){
       printf("#endif\n");
     }
   }
+  printf("  {NULL, 0, 0, 0, 0, NULL},\n");
   printf("};\n");
} /*

_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to