Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

PATCH: Re: vared bug



On Aug 14,  4:12pm, Bart Schaefer wrote:
}
} On Aug 14, 11:37am, Bernd Eggink wrote:
} }     
} }     vared -cp prompt var
} }     
} } where 'var' is unset.
} 
} I get "BUG: attempt to free storage at invalid address".  It happens at
} zsfree() at Src/Zle/zle_main.c line 531.

This appears to have come from the changes to remove PERMALLOC/LASTALLOC
and friends.

Index: Src/Zle/zle_main.c
===================================================================
@@ -877,6 +877,8 @@
     } else if (*s) {
 	zwarnnam(name, "invalid parameter name: %s", args[0], 0);
 	return 1;
+    } else {
+	s = ztrdup(s);
     }
 
     if (SHTTY == -1) {


-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com

Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net   



Messages sorted by: Reverse Date, Date, Thread, Author