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

Re: aliases+=(foo 'echo bar') crash



On Jul 23,  6:37pm, Bart Schaefer wrote:
}
} The bad values in *pm come from here:
} 
}     857         oldpm = (Param) (paramtab == realparamtab ?
}     858                          gethashnode2(paramtab, name) :
}     859                          paramtab->getnode(paramtab, name));
} 
} (where paramtab != realparamtab).  That's as far as I've gotten.

So ->getnode() there is getpmralias() which calls getalias() which
allocates everything on the heap.

When arrhashsetfn() tries to replace the value returned from getalias(),
kaboom.

The problem may be that the aliases hash has been autoloaded from the
zsh/parameter module AFTER the flow of control has already passed the
point of deciding what function to call to perform the assignment, and
so is using the generic hash function instead of the special functions
for setting aliases.



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