From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from primenet.com.au (ns1.primenet.com.au [203.24.36.2]) by inbox.vuxu.org (OpenSMTPD) with ESMTP id c09efe9d for ; Sat, 19 Oct 2019 05:39:45 +0000 (UTC) Received: (qmail 25999 invoked by alias); 19 Oct 2019 05:39:36 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: List-Unsubscribe: X-Seq: 44851 Received: (qmail 11842 invoked by uid 1010); 19 Oct 2019 05:39:36 -0000 X-Qmail-Scanner-Diagnostics: from forward400o.mail.yandex.net by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.102.0/25601. spamassassin: 3.4.2. Clear:RC:0(37.140.190.176):SA:0(-2.7/5.0):. Processed in 3.736015 secs); 19 Oct 2019 05:39:36 -0000 X-Envelope-From: apatiskogen@yandex.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: pass (ns1.primenet.com.au: SPF record at _spf-ipv4.yandex.ru designates 37.140.190.176 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.com; s=mail; t=1571463531; bh=DDSy5KfzgCQNiqof8vTT8hwamvg0B8Lg4bObzBRvu28=; h=Message-Id:Date:Subject:To:From; b=TQVDJPvi9eo/v20wVfpg/5FZtnEn3MpAD5wSPhtcRSnYSmYAPuqFJCsgMbnrn2w1j 3kG2ctHvuBr7/yJn5Bv8LL0qgY+uHf88cfkS0SX2SG5rYSK8AuMZJqurrqWArX+6Ng seHwh2IthK1kidTdnSpQDgmX7wba3tCD4g4EhBuE= Authentication-Results: mxback14o.mail.yandex.net; dkim=pass header.i=@yandex.com From: . . To: zsh-workers@zsh.org Subject: broken random variable MIME-Version: 1.0 X-Mailer: Yamail [ http://yandex.ru ] 5.0 Date: Sat, 19 Oct 2019 00:38:51 -0500 Message-Id: <8724321571463531@myt3-a2a42ac8caa6.qloud-c.yandex.net> Content-Transfer-Encoding: 7bit Content-Type: text/plain 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.