Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Memory access bug with negative subscripts
- X-seq: zsh-workers 23695
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxx
- Subject: Memory access bug with negative subscripts
- Date: Tue, 24 Jul 2007 21:52:22 -0700
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
This bug appears at least as far back as zsh 3.0.5, and probably longer
ago. Still happens in the latest CVS co from SourceForge.
x=x
x[-10]=y
print $x
I can't predict what you'll see, but unless you get very lucky it won't
be what you ought to see. For example,
torch% x[-$RANDOM]=z
torch% print $x
zpasswd
I imagine running that under ElectricFence or some similar memory checker
would be instructive.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author