From: . . <apatiskogen@yandex.com>
To: zsh-workers@zsh.org
Subject: broken random variable
Date: Sat, 19 Oct 2019 00:38:51 -0500 [thread overview]
Message-ID: <8724321571463531@myt3-a2a42ac8caa6.qloud-c.yandex.net> (raw)
Hello, zsh-workers
I found a bug in the $RANDOM variable; on OpenBSD, the command "echo $RANDOM | tee" will print the same number
across different executions of the same command, and the value of "echo $RANDOM" will be the same as the last value.
At first I thought that this bug was limited to OpenBSD, because it was not reproduced on the website "rootnroll" which has
a demo for "oh my zsh", but today I tested another command on the website: "yes | while read; do echo $RANDOM; done | head",
and all the random numbers are the same across different executions of the command. I hope that's enough information for you.
I reported the first bug to OpenBSD on monday, and Theo de Raadt replied and said that I should tell you instead.
I guess this e-mail might be a bit late, but I was waiting for evidence that it can be reproduced elsewhere.
PS: I would recommend using "arc4random" on OpenBSD if that is at all possible.
Thanks for reading my message. Good day.
next reply other threads:[~2019-10-19 5:39 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-19 5:38 [this message]
2019-10-19 5:44 ` Roman Perepelitsa
2019-10-19 6:09 ` Daniel Shahaf
2019-10-19 9:48 ` Sebastian Gniazdowski
2019-10-19 14:31 ` Mikael Magnusson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8724321571463531@myt3-a2a42ac8caa6.qloud-c.yandex.net \
--to=zsh-workers@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).