From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FROM,HTML_MESSAGE,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 25058 invoked from network); 8 Jun 2021 21:04:26 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 8 Jun 2021 21:04:26 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20200801; t=1623186266; b=rvU72jZcOuV5cDmHlHERBtH+BiKtB4dFxV4kB4HYFyFMGxxTo/ngM6l0xDnPZvLNOp2qkkMY3b V3cKBWxSh5k9+iMy0RNexLqZMFfNu/Voec/ySLX2fCvUJOyLnDsW7Ka7XWjE4MQTZrHsCnqb8g A/oh4yqwKJrx7sPfQSqlAgUgZmk5m6unTArYEqzK3XpgOngNud1w1c9nzUV5VoLbMxxZvrKEfV 7gCYVPnxmP07E50kdWHiQBY1P7mDdY4CEbkik4lrp5VISuddSooR5/l9tul5j6OxxUmuuUFM3L 8p8gfGMGd3QSurmp95HARBnLyML6gHoysOeqv3ExiMAvzA==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-lj1-f180.google.com) smtp.remote-ip=209.85.208.180; dkim=pass header.d=gmail.com header.s=20161025 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20200801; t=1623186266; bh=FtkkMUpAM3DbNVIpO1rkPwypljamAwJSbPeK0hSWFj4=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Type:Cc:To:Subject:Message-ID:Date:From:In-Reply-To: References:MIME-Version:DKIM-Signature:DKIM-Signature; b=b/x7HYSrjpb5ArK4eU2N42SvRqc5spBWzVL/a2kDG/HTfxZsF81VohKIbrqU/ZXjsYG9exsQ+Q cg3sFVv9KrJr5+FKpRLABrBu0ghM+yEjqazen8mi5n5XPy/Vsz5VplHNZ4JWXKBA4Ig4kOMqf2 rwGDzQ9THvurZzWRKGUqH6+baYTd+vJ84lNbAvggLi0iTHXsmfmUAru3wJr+TTtGfM4CNCWeaA AeTPoluyWDA470LlcOXdW1C0YfWRp2FB/As9r1jh0/Ng8MDz7RRqQ8J9eE6pjwwlamH4aGW/Dc PvUJTmrDHlZ7RXEOIR4RRq5/wfp6uTGMP7VjvR2GOIfhsg==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20200801; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:Content-Type:Cc:To:Subject:Message-ID :Date:From:In-Reply-To:References:MIME-Version:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=Ahw+G9xdkhUFyzj3eP8qjlY38tESESPchdS7Ha5DJnY=; b=DKS+bwx/SHtZzZYMraY4uaQTQp 20QRClKslprYjLdcqKaSoX5gufiJ8LA7/XU7CvMgtxKN2vBgwFAhy/aeDoA3Xd1e3X9IP4w6ahORT xWvkD2GvmrzpMWMjZ0QztQ83PxRnLjc7WRvweLJBM3M36YzrIFtgLod7FqCdfH8FCgJrhol5jXRY1 6F6IO4DuYfzIqRKGx2VuMcNPItEejsl24E0ZB5McQWcd9wQKRu5p4V9apcXAtOy6XPDRdlS/mG9A+ FEwWJ3j5ij72ZGos6rXQAfNpKMELNMSgYEUks/4IuBLHv/Cq30t2e1roGCPEOSQRAoAjIqOPR71d0 HfGSvusg==; Received: from authenticated user by zero.zsh.org with local id 1lqitd-0004eF-LN; Tue, 08 Jun 2021 21:04:25 +0000 Authentication-Results: zsh.org; iprev=pass (mail-lj1-f180.google.com) smtp.remote-ip=209.85.208.180; dkim=pass header.d=gmail.com header.s=20161025 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none Received: from mail-lj1-f180.google.com ([209.85.208.180]:40783) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1lqisw-0003uQ-Ob; Tue, 08 Jun 2021 21:03:43 +0000 Received: by mail-lj1-f180.google.com with SMTP id x14so14520135ljp.7 for ; Tue, 08 Jun 2021 14:03:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Ahw+G9xdkhUFyzj3eP8qjlY38tESESPchdS7Ha5DJnY=; b=nsPOxyc49pZJ4o10CmPQpEOhLt/+225nzyRsTRVplJA9g1cj5k4ukNjnCgMCZtmR7y qxMbU3Dgz/nkS2VcFOaA4rOsqKdZSs0Vs62bLJq1xXW3AVpg/0kHU7vapLld4Pi/y+Vk 9VO/0PfCPwbGeuzRlHNDLlq/KDCTMTY7mQqaq87Szcm4ZgrtCh7hAHgLl1e8c+g5uZXs G9ObMM1FHb2llV0AyGf4SHY1+rl2qDG05/LKHp1NxZ6wu5qMBQ1Ff/uQLQiK0Zh0pBz/ lWICMjww3xGWvh9Wz0SI8pHJ4hWjmQCANJIKK0XtVRLVYGLMJjqGECxdt4FbeclBqpSN Z4WQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Ahw+G9xdkhUFyzj3eP8qjlY38tESESPchdS7Ha5DJnY=; b=kDiS21J54CGLS3efuHmnMi3SxnfKjAc3p5ZWu+jO+VXw1C/MoilVzuH9Jyvj35TVX2 LZqcBG19DjaWcgV79oDIeWBGFsITtQ4tvNG4N1x1yTwk86lhznigGsbNFWaQ856iWjd7 U/ioGYJF091mZ3YcJdlDaY5RIXUSCbXpwBLpe5LAtzRvI595RT7BOCn4p8Dlauf6vVTo miLUI5QJj3zng36yzg4I3xgjvR6X4zq2OJwgecuxmDKjfU92sPDUpt8dXPfnBJHfRff6 OSkFSTMTAH0yk89aqKnNgCL73w07/HI+uyI+2falpj+uGy+ms8V/bX1iMV53i+sBfg++ ltkg== X-Gm-Message-State: AOAM533LZZK5hljtEkE/fBK78L4m20hxkSkfahrumdgywdDDlQGV65j4 NawJA7FSwIQ0HFitp615v3oAIOEhuoW11oHXSg== X-Google-Smtp-Source: ABdhPJy5Y8JDDb9ULDXppa7h/pgQG6PTDwAQI5P5tUNnTI9xV5xD4skXRnEjd+yWweyw5oJl62Fob7yBN/mbyEhw4is= X-Received: by 2002:a2e:9b96:: with SMTP id z22mr10413926lji.164.1623186222209; Tue, 08 Jun 2021 14:03:42 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Jonathan Ching Date: Tue, 8 Jun 2021 14:03:31 -0700 Message-ID: Subject: Re: Unterminated command truncates history file To: Roman Perepelitsa Cc: Bart Schaefer , Zsh Users Content-Type: multipart/alternative; boundary="0000000000002dea8405c4477e53" X-Seq: 26769 Archived-At: X-Loop: zsh-users@zsh.org Errors-To: zsh-users-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-users-request@zsh.org X-no-archive: yes List-Id: List-Help: List-Subscribe: List-Unsubscribe: List-Post: List-Owner: List-Archive: --0000000000002dea8405c4477e53 Content-Type: text/plain; charset="UTF-8" Hah, thank you! That's what I get with fiddling with large integers I suppose... Setting to a *reasonably* lower number seems to have resolved the issue! On Tue, Jun 8, 2021 at 2:00 PM Roman Perepelitsa < roman.perepelitsa@gmail.com> wrote: > On Tue, Jun 8, 2021 at 10:42 PM Jonathan Ching wrote: > > > > It doesn't seem like the issue is resolved by 5.8. Could it be something > else? > > I can reproduce this: > > % docker run -e TERM -it --rm zshusers/zsh:5.8 zsh > 7a7002248c6a# print 'HISTFILE=~/hist' >>~/.zshrc > 7a7002248c6a# print 'HISTSIZE=9223372036854775807' >>~/.zshrc > 7a7002248c6a# print 'SAVEHIST=9223372036854775807' >>~/.zshrc > 7a7002248c6a# print 'setopt incappendhistory' >>~/.zshrc > 7a7002248c6a# exec zsh > 7a7002248c6a# echo 1 > 1 > 7a7002248c6a# echo 2 > 2 > 7a7002248c6a# cat ~/hist > echo 1 > echo 2 > cat ~/hist > 7a7002248c6a# echo " > dquote> > 7a7002248c6a# cat ~/hist > echo 1 > cat ~/hist > > Replacing 9223372036854775807with mere 1000000000000000000 avoids the > issue. > > From my experience with zsh source code, it doesn't bother with > handling integer overflow, so I'm not sure how serious this bug is. > > Roman. > --0000000000002dea8405c4477e53 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hah, thank you! That's what I get with fiddling with l= arge integers I suppose... Setting to a reasonably lower number seem= s to have=C2=A0resolved the issue!

On Tue, Jun 8, 2021 at 2:00 PM Roman Pere= pelitsa <roman.perepelits= a@gmail.com> wrote:
On Tue, Jun 8, 2021 at 10:42 PM Jonathan Ching <jon48c@gmail.com> wrote: >
> It doesn't seem like the issue is resolved by 5.8. Could it be som= ething else?

I can reproduce this:

=C2=A0 =C2=A0 % docker run -e TERM -it --rm zshusers/zsh:5.8 zsh
=C2=A0 =C2=A0 7a7002248c6a# print 'HISTFILE=3D~/hist'=C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 >>~/.zshrc
=C2=A0 =C2=A0 7a7002248c6a# print 'HISTSIZE=3D9223372036854775807' = >>~/.zshrc
=C2=A0 =C2=A0 7a7002248c6a# print 'SAVEHIST=3D9223372036854775807' = >>~/.zshrc
=C2=A0 =C2=A0 7a7002248c6a# print 'setopt incappendhistory'=C2=A0 = =C2=A0 =C2=A0 >>~/.zshrc
=C2=A0 =C2=A0 7a7002248c6a# exec zsh
=C2=A0 =C2=A0 7a7002248c6a# echo 1
=C2=A0 =C2=A0 1
=C2=A0 =C2=A0 7a7002248c6a# echo 2
=C2=A0 =C2=A0 2
=C2=A0 =C2=A0 7a7002248c6a# cat ~/hist
=C2=A0 =C2=A0 echo 1
=C2=A0 =C2=A0 echo 2
=C2=A0 =C2=A0 cat ~/hist
=C2=A0 =C2=A0 7a7002248c6a# echo "
=C2=A0 =C2=A0 dquote>
=C2=A0 =C2=A0 7a7002248c6a# cat ~/hist
=C2=A0 =C2=A0 echo 1
=C2=A0 =C2=A0 cat ~/hist

Replacing 9223372036854775807with mere 1000000000000000000 avoids the issue= .

>From my experience with zsh source code, it doesn't bother with
handling integer overflow, so I'm not sure how serious this bug is.

Roman.
--0000000000002dea8405c4477e53--