Path: csiph.com!goblin2!goblin1!goblin.stu.neva.ru!usenet.stanford.edu!not-for-mail From: Chet Ramey Newsgroups: gnu.bash.bug Subject: Re: core dump an alt. alt1 alt. Date: Tue, 9 Jun 2020 11:46:22 -0400 Organization: ITS, Case Western Reserve University Lines: 70 Approved: bug-bash@gnu.org Message-ID: References: <20200608225428.9A3DB1257DF@mail.jonkmans.nl> <1c35c79d-3a73-2204-8814-16ba46f4f5aa@case.edu> <20200609091918.GA21994@jonkmans.nl> Reply-To: chet.ramey@case.edu NNTP-Posting-Host: lists.gnu.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Trace: usenet.stanford.edu 1591717593 4013 209.51.188.17 (9 Jun 2020 15:46:33 GMT) X-Complaints-To: action@cs.stanford.edu Cc: chet.ramey@case.edu To: bug-bash@gnu.org, bash@packages.debian.org Envelope-to: bug-bash@gnu.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=case.edu; s=smtp-primary; t=1591717589; bh=cVBOmEad1r5IX/meWxxFmGAA5lCDkQ7E2G9uRADF4+M=; h=Reply-To:Cc:Subject:To:References:From:Message-ID:Date: MIME-Version:In-Reply-To:Content-Type:Content-Transfer-Encoding; b=LjJhH/HeWPxLIa/RX9cFD2G4PnWayZd0vrv4DjXB9NqfHMDNu0O24I5WwysJj34yzS JBzNhDe2U6RWx2sCJfYz3FcXwn9LXjQFrbYVG/GZtrQwOnJpkg4T9+FEUy034wFQuzR knO4CJenW/Mf4fOi5IjIqyNJ36Obkha7dqOfsoB2Ja94rfC48LmAb/4Ef4Fayfu2k1E W+hFgQjRPZXgyjx/0Vkps7gmHhzJP9MbfY/6t4qYAkXEkwNg4RFOBpH+Mkaz5Nl9neR ybT49CHBtLKLNelW3HpJG5trc0Hxt16uvCnan4Y1WLrJgjpAEUJg99g7Q1ZysMjahNd +cHXUG+g== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=case.edu; s=smtp-primary; t=1591717585; bh=k7xhhhM/r1jGc/bpqLaMSPlnlD4uWrlmfDTKrW2OGDc=; h=Reply-To:Cc:Subject:To:References:From:Message-ID:Date: MIME-Version:In-Reply-To:Content-Type:Content-Transfer-Encoding; b=UwPfTf4HH5YSuFI7adZ/g2lXNJu8mER5r1guH43S7sHwCU47dlkT+i5s5GhDhpOJg8 T1z+Ecir9RsSGKT6+2eTxPYFhqj4WtlbHg0uMEnjOeb1/7p3ChvODiUM+v6ekOOIGNh x+Z3HKNkziW5qReuTQm5C6N6sM/td0GieQGqtsZ1cKn1Okzmr14AJWODqkkKts2sEi+ QILcmX9+nYAT15+Ifcsm+vOHaXuCVbm5Xbf6VqG5rQD0dLaVozv7GXB+/OE8/MtX4Fg bDwqXq8Gg6s53lsm5joF9Z1Lo5dIVynltAoRgoa63ca99U8y/2n9NGhefoA/1NqfDdV QGSdVbxA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=case.edu; s=g-case; h=reply-to:cc:subject:to:references:from:autocrypt:organization :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=k7xhhhM/r1jGc/bpqLaMSPlnlD4uWrlmfDTKrW2OGDc=; b=dDo+QBZbliNzj9jKdGHTjUUod7U/WnKRYuIjeZV7PzeZQTNIf+ukL7tV+ibKy+b6zz myVps3F0eDWN18LKrbRFMUbAH2gS7q9rD1OgFGg65AabM8G+8OZkueCjTeQ154quQNkz C00RXzutoXl2zRNspY5SWgJdQIfl0nI1VNXgET6udcNIzaQq6v2Xqs49Fg+Alx4woi4c m82WROAVOY5ntQBaMzdk7zWrMSgx55z1L8MUgexK3gYMvtloFvBkLXn93DsWu3H0EHxH 5uELWs+lmdQjE4hNVTbTCx1ZRyqJSeXbi47XZ1Q964Ri3N87Fx7xIwWNkW0FZQw6dZt0 xpxQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:reply-to:cc:subject:to:references:from:autocrypt :organization:message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=k7xhhhM/r1jGc/bpqLaMSPlnlD4uWrlmfDTKrW2OGDc=; b=lb52nceeSh0oNvAQAdp1Ps6zvmwwNOZEX3aOXnAdTcLbyx19wLfMlQluZFvnelCZOP qoBnLGvAFkczXjsiK/QJZ0DQG/kJ3G+zVovOc80EX6rvTGu5Gjn1rzQdCcrERx3hqdDX VTLFh31vBEliH0aHwjDfjjd9G0Zx2K3hkc8EN/0Rbgj1wnzuH7v7IQ/wo6tamXJIkZrT Tts+Z/6GVgNbh1OufeVSKy9ZJJYXOtLjBs7bKYifpQ+2tz2Q6Txs6tcSbX1hmufF6+4e 7XYL+9HuSG6yOMLTNr/hbuxe0KQuGNwzYrsQnDVuxup1roLD3W99YP3au5uwUxGG02WS JaUQ== X-Gm-Message-State: AOAM533EJDDGUi4KE16ZilBQJpeq8MJnvBMX7QFVFngQEcqA8yTvBPp/ C/3u8wcXFVK6dvsE4RVtke3LHWzwfKTMJiSuUGYgddvY4lZGzwfTc7+dZn/ek9UCMybOQhQC0XF uUEw81nzD8K4= X-Received: by 2002:a37:2781:: with SMTP id n123mr26877967qkn.377.1591717584395; Tue, 09 Jun 2020 08:46:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz4SkUT9GHmaqxnfwxPtkg9+UGho7t8lTU7Tf3/vTqGhdR+XEH/LZndPAgLoWXt5h8Ecp/q4Q== X-Received: by 2002:a37:2781:: with SMTP id n123mr26877923qkn.377.1591717583955; Tue, 09 Jun 2020 08:46:23 -0700 (PDT) Autocrypt: addr=chet.ramey@case.edu; prefer-encrypt=mutual; keydata= mQGiBEEOsGwRBACFa0A1oa71HSZLWxAx0svXzhOZNQZOzqHmSuGOG92jIpQpr8DpvgRh40Yp AwdcXb8QG1J5yGAKeevNE1zCFaA725vGSdHUyypHouV0xoWwukYO6qlyyX+2BZU+okBUqoWQ koWxiYaCSfzB2Ln7pmdys1fJhcgBKf3VjWCjd2XJ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; rv:68.0) Gecko/20100101 Thunderbird/68.9.0 In-Reply-To: <20200609091918.GA21994@jonkmans.nl> Content-Language: en-US X-Mirapoint-IP-Reputation: reputation=Good-1, source=Queried, refid=tid=0001.0A020303.5EDFA86A.004D, actions=tag X-Mirapoint-IP-Reputation: reputation=good-1, source=Fixed, refid=n/a, actions=tag X-Junkmail-Status: score=7/80, host=mpv4-2015.case.edu X-Junkmail-PrAS-Raw: score=7/80, refid=2.7.2:2020.6.9.152417:17:7.944, ip=, rules=__YOUTUBE_RCVD, DKIM_SIGNATURE, __X_GOOGLE_DKIM_SIGNATURE, __HAS_REPLYTO, __HAS_CC_HDR, __SUBJ_REPLY, __BOUNCE_CHALLENGE_SUBJ, __BOUNCE_NDR_SUBJ_EXEMPT, __TO_MALFORMED_2, __TO_NO_NAME, __MULTIPLE_RCPTS_TO_X2, __HAS_REFERENCES, __REFERENCES, __HAS_FROM, FROM_EDU_TLD, __HAS_MSGID, __SANE_MSGID, DATE_TZ_NA, __USER_AGENT, __MOZILLA_USER_AGENT, __MIME_VERSION, __IN_REP_TO, __CT, __CT_TEXT_PLAIN, __CTE, __REPLYTO_SAMEAS_FROM_ADDY, __REPLYTO_SAMEAS_FROM_ACC, __FROM_DOMAIN_IN_ANY_CC1, __FROM_DOMAIN_IN_ANY_CC2, __REPLYTO_SAMEAS_FROM_DOMAIN, __DKIM_ALIGNS_1, __DKIM_ALIGNS_2, __ANY_URI, __URI_MAILTO, __URI_WITH_PATH, __URI_ENDS_IN_SLASH, __URI_NO_WWW, __CP_URI_IN_BODY, __SUBJ_ALPHA_NEGATE, __URI_IN_BODY, __URI_NOT_IMG, __MAIL_CHAIN, __FORWARDED_MSG, __BODY_NO_MAILTO, __NO_HTML_TAG_RAW, BODYTEXTP_SIZE_3000_LESS, BODY_SIZE_2000_2999, __MIME_TEXT_P1, [TRUNCATED], so=2010-03-03 19:42:08, dmn=2016-08-03-0138 Received-SPF: pass client-ip=129.22.103.195; envelope-from=chet.ramey@case.edu; helo=mpv4-2015.case.edu X-detected-operating-system: by eggs.gnu.org: First seen = 2020/06/09 11:46:26 X-ACL-Warn: Detected OS = Linux 2.4.x-2.6.x [generic] X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: bug-bash@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Bug reports for the GNU Bourne Again SHell List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Mailman-Original-Message-ID: X-Mailman-Original-References: <20200608225428.9A3DB1257DF@mail.jonkmans.nl> <1c35c79d-3a73-2204-8814-16ba46f4f5aa@case.edu> <20200609091918.GA21994@jonkmans.nl> Xref: csiph.com gnu.bash.bug:16376 On 6/9/20 5:19 AM, Mike Jonkmans wrote: > On Mon, Jun 08, 2020 at 08:43:31PM -0400, Chet Ramey wrote: >> >> On 6/8/20 6:54 PM, bashbug@jonkmans.nl wrote: >> >>> Bash Version: 4.4 >>> Patch Level: 20 >>> Release Status: release >>> >>> Description: >>> Got a core dump (segmentation fault) when i type: Alt-. Alt-1 Alt-. >> >> You tried to redo `.'. The way this happens is you are in command mode, >> run that yank-last-arg binding (which sets the last vi-mode command to >> `.'), then try to run it again, but miss the timeout described in the last >> paragraph of my previous message, which results in you trying to redo the >> last command (`.') in a context where the binding for `.' is vi-redo. I put >> something in to stop that at the same time I made the other changes >> described in my previous message. > > The problem from the previous message was the trigger to try this. :) I figured. > > Are you sure that it is a timeout problem in this case? > Because if I prepend the followong line to the inputrc: > set keyseq-timeout 0 > the core dump is also generated. It's the same phenomenon. Redoing `.' is what triggers it, but there are a couple of issues here. In vi-mode, without the changes I made, the yank-last-arg puts you into insert mode (like the vi-mode `_' command). The `.' is the last command executed. > > It seems i enter command mode after I press Alt-1. You do. This all presumes that the Alt is converted into ESC by the terminal. The ESC puts you into command mode, and the 1 starts a digit argument. Here's what I think happens: > The following Alt-. probably gets split into Alt(Escape) and a '.' > The Escape breaks off the Alt-1 'mode' and then the '.' becomes vi-redo. > But I fail to see why the vi-redo is bound to vi-redo here. :( That's where it's ambiguous. You have two key sequences, both bound to commands, one of which (ESC) is a prefix of the other (ESC-.). If you set the keyboard timeout to 0, it takes the ESC as a separate key sequence, which is unbound in vi command mode, and reads the `.', which is bound to vi-redo. The last command in vi mode was `.', which vi-redo attempts to redo given the current keymap, which has it bound to vi-redo, and off you go. It may also do this because the ESC gets pushed back on the input stream after breaking out of the digit loop, but I kind of doubt that. In any event, I believe the changes in the next devel branch push should fix these. Chet -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRU chet@case.edu http://tiswww.cwru.edu/~chet/