zsh-users
 help / color / mirror / code / Atom feed
From: Jonathan Ching <jon48c@gmail.com>
To: Roman Perepelitsa <roman.perepelitsa@gmail.com>
Cc: Bart Schaefer <schaefer@brasslantern.com>, Zsh Users <zsh-users@zsh.org>
Subject: Re: Unterminated command truncates history file
Date: Tue, 8 Jun 2021 14:03:31 -0700	[thread overview]
Message-ID: <CA+61jt18bR95mszPLhAzX4=mHOYP2gbHnk4XWP5Yoq74yWj8kA@mail.gmail.com> (raw)
In-Reply-To: <CAN=4vMpYCgeu7-uBVXM9zR1yQvxUh_DD3UW_b3P5pSWijHm=rw@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1273 bytes --]

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 <jon48c@gmail.com> 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.
>

[-- Attachment #2: Type: text/html, Size: 1854 bytes --]

      reply	other threads:[~2021-06-08 21:04 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-08 19:48 Jonathan Ching
2021-06-08 20:14 ` Bart Schaefer
2021-06-08 20:25   ` Jonathan Ching
2021-06-08 20:41     ` Jonathan Ching
2021-06-08 20:59       ` Roman Perepelitsa
2021-06-08 21:03         ` Jonathan Ching [this message]

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='CA+61jt18bR95mszPLhAzX4=mHOYP2gbHnk4XWP5Yoq74yWj8kA@mail.gmail.com' \
    --to=jon48c@gmail.com \
    --cc=roman.perepelitsa@gmail.com \
    --cc=schaefer@brasslantern.com \
    --cc=zsh-users@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).