Re: [fossil-users] Segfault on json test

2018-07-05 Thread Stephan Beal
On Thu, Jul 5, 2018 at 5:38 PM Dingyuan Wang  wrote:

> Hi,
>
> The following test:
>
>   tclsh test/tester.tcl fossil json
>
> fails with:
>
> [...]
> /home/gumble/dev/fossil/fossil json --json-input anon-1
> ERROR: child killed: segmentation violation
>

https://www.fossil-scm.org/index.html/info/f488a5aa97a3b15f

There are still 2 json tests which fail, but i didn't write those and can't
say anything useful about them :/. The segfault is resolved, in any case.

Thanks for the report!

-- 
- stephan beal
http://wanderinghorse.net/home/stephan/
"Freedom is sloppy. But since tyranny's the only guaranteed byproduct of
those who insist on a perfect world, freedom will have to do." -- Bigby Wolf
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Segfault on json test

2018-07-05 Thread Stephan Beal
On Thu, Jul 5, 2018 at 5:38 PM Dingyuan Wang  wrote:

> The following test:
>
>   tclsh test/tester.tcl fossil json
>
> fails with:
>

i believe the fix is simply:

[stephan@host:~/fossil/fossil]$ f diff
Index: src/cgi.c
==
--- src/cgi.c
+++ src/cgi.c
@@ -211,11 +211,12 @@
   const char *zValue,   /* Value of the cookie.  Automatically escaped */
   const char *zPath,/* Path cookie applies to.  NULL means "/" */
   int lifetime  /* Expiration of the cookie in seconds from now */
 ){
   char *zSecure = "";
-  if( zPath==0 ){
+  if(!g.isHTTP) return /* likely JSON CLI mode */;
+  else if( zPath==0 ){
 zPath = g.zTop;
 if( zPath[0]==0 ) zPath = "/";
   }
   if( g.zBaseURL!=0 && strncmp(g.zBaseURL, "https:", 6)==0 ){
 zSecure = " secure;";


but i need to test more before committing.

-- 
- stephan beal
http://wanderinghorse.net/home/stephan/
"Freedom is sloppy. But since tyranny's the only guaranteed byproduct of
those who insist on a perfect world, freedom will have to do." -- Bigby Wolf
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users