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

This looks obviously wrong to me, but maybe it's unreachable?



This is in sethparam():

    if (!(v = fetchvalue(&vbuf, &s, 1, SCANPM_ASSIGNING))) {
	createparam(t, PM_HASHED);
	if (isset(WARNCREATEGLOBAL) && locallevel > 0)
	    check_warn_create(v->pm, "associative array");

That's plainly dereferencing v->pm in a block where v is NULL.

However I think it's impossible to reach that code because you can never
assign to an associative array without declaring it first, so it's not
possible to accidentally create one at global scope.



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