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

Re: [bug report] 4.0.2 / 4.0.4 dumps core

Bart wrote:

> ...
> } > rather than simply allowing the completion code to poke bytes into
> } > the real reswdtab.
> } 
> } But it isn't the completion code. At least not for me. It SEGVed in
> } the pattern matching code (called from the completion code).
> Yes, but it's the completion code that's "violating" the pattern match
> code API, in the sense that the pattern match code is supposed to get
> writable strings and the completion code isn't providing them.

Yes (but I'd still prefer it if the matching code that really only needs
to read the strings it gets wouldn't modify them -- but that's probably a
different matter).

> } And I was tempted to change that code to at least test if it was
> } trying to write a '\0' onto the Null-byte at the end of a string.
> That would unnecessarily penalize every other caller of the pattern
> match code, wouldn't it?

Yes, but not much, and, as I forgot to write, I don't suggest adding that
because it could result in weird bugs (it always worked because it only
ever needed to write a Nul-byte onto the Nul-byte which it really didn't
do, but then it suddenly needs to write a Nul-byte in the middle and...).

> If there's no problem with using dupstring() in dumphashtable(), then
> I'd prefer to commit my patch rather than yours.

No objections at all from my side.


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