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

Re: [PATCH 0/3] jp: Patchset for parameter expansion segfaults



On Sun, Jan 14, 2018 at 12:41:05PM -0800, Bart Schaefer wrote:
> With appreciation for your efforts here, preventing segfaults is not
> the correct goal.  The goal should be that the software produces the
> correct results.
> 
> Trapping bad pointers in the string copy/catenate routines potentially
> masks more serious errors; it introduces what only appears to be
> error-free operation in cases that probably ought to fail.  A segfault
> in zhtricat() is nearly always an indication that the calling code is
> doing something wrong, and covering that up only makes it harder to
> find what that is.
> 
> At the very least any such "succeed in spite of caller screwup" code
> should be wrapped in #ifndef DEBUG or the like.

No worries, I understand and wholeheartedly agree with that
philosophy. It would definitely be better to go over the
calling code and figure out exactly where the wrong assumptions
are being made with respect to intended behavior.

When I have a bit more free time I'll hopefully do just that, cheers.

-- 
Joey Pabalinas

Attachment: signature.asc
Description: PGP signature



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