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,T_SCC_BODY_TEXT_LINE,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 30721 invoked from network); 12 Aug 2022 15:40:49 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 12 Aug 2022 15:40:49 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1660318849; b=WtiRl3zEkixz8tTuKwu3Dddfen5KQLnNWnyqGFgyuqAgtm/AL27DJXn6ar/M7j6dwujI+/3rvw X0a7i5yErSJQBKL0L7HJgetJuEJLskfdVfsfZlFV+4n2pY8kU4VsJ1xkAY9arJ/XyGVcFnqlYa XOAoJx6QdFILiXGTAD4L+YtwWsWqJEXKKh6X7Et+xvDgBbp/zy7vY3AMNCLnLIM4R0LvOZciYa aampzKmVVhOorBI2mxz7OesoRTSSX1p0N4RdxfbQJtB2ouQPu0vudLtfmkVQU0c81L357UKjxj dl/wajo74WZA+4YWurB+r1MzFTtHTynnfBnSRPUV6DAKag==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-ej1-f42.google.com) smtp.remote-ip=209.85.218.42; dkim=pass header.d=gmail.com header.s=20210112 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-20210803; t=1660318849; bh=6nrd2usGmBQQHSEqu0X957U1G+gNoFSDaZhlwk4aEYg=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Type:To:Subject:Message-ID:Date:From:Reply-To: In-Reply-To:References:MIME-Version:DKIM-Signature:DKIM-Signature; b=itjM0QCBHZbD9YJe0oesfNy/f6ml4srTIqLh3SRRTslkfnUVazGAuraQGB0iPXr+H4W3mdzQhj 4B0uuGaszhF04zFxrzYuHGp7u+/3DJf1TVDp8Cy1B5LliydgDNYMyVtjTrnIhmODHUpFE37EgF 4fmzpxnlNqHoxolcp2yAXb+JAvjzWSNi8YxV1Ifx+926sDtKHctQpUFHveKrOdknWCTX4ip+gE 3Fm2lcSR6fD/om6Amtw3CB3V+GUydrUIZ8lpTTFe2SACNpcQRTUUYA0GtHofo1WyMSDeLO08C5 sQbZBbi2alYyub+++oVPmlTODJzkjpQd+lUH+3/mxZrr4g==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20210803; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:Content-Type:To:Subject:Message-ID: Date:From:Reply-To:In-Reply-To:References:MIME-Version:Cc: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=Jo3CIcm28apt3LpTyCMSMy4boPrFwPp658fyO8+ji2A=; b=ZRo3L4wXflPoWWZwIvRffiw5a2 hl+G4dTIwdcTtPAJLH4pX7ZDazlkHCdbm4B01oRiblGhkDo5w+EWSHRWyBh3b6FdhdUasIFo8fdHp LyyQV/lo6nLoWrYM5sJT6GLiF2Qcn031OD6qjyuNBqsa1rhX4NZhG/mYLpRt3gpIgOYLteiEULYJ1 YpMOX9Y3s670DrX4MRRyDtZYoHR64CaFm59/hlb8RDuzJs7dg3OF7BC1bIzFW67CLNVN42Ztyh9Q3 2eE6z47w+pEZBAPH68N+rckaoyb57co913UwVB8rLPjYtycV0p0mIxIuLKMFUpcuXPdONfO87LTEI IIenIZXQ==; Received: from authenticated user by zero.zsh.org with local id 1oMWmG-000B3k-TH; Fri, 12 Aug 2022 15:40:48 +0000 Authentication-Results: zsh.org; iprev=pass (mail-ej1-f42.google.com) smtp.remote-ip=209.85.218.42; dkim=pass header.d=gmail.com header.s=20210112 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none Received: from mail-ej1-f42.google.com ([209.85.218.42]:39625) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1oMWh9-000AdD-UA; Fri, 12 Aug 2022 15:35:32 +0000 Received: by mail-ej1-f42.google.com with SMTP id i14so2642481ejg.6 for ; Fri, 12 Aug 2022 08:35:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:subject:message-id:date:from:reply-to:in-reply-to:references :mime-version:from:to:cc; bh=Jo3CIcm28apt3LpTyCMSMy4boPrFwPp658fyO8+ji2A=; b=TWS0OqHFz53MjmM6oRHE0aEZBW3fLNV8pN+OhHKkUkQsPossEr1gHRPry+xjbV98uk ++Qos3agRND3zV9heasZnPlid9fDtDMva+8HuOnrr0ghCNS997zhFR3Ykz8gHsjlQ9p3 gIXmBUuRen+Ls5HsN+K+7rO8nZqlnSnZ+x6sJ6ft47fG4TGQTWbZGh/IkM7zO9my1h9f 64w144xlIZ99PaIoZgoI4eaMVOdPxStqL8+GCmg8psUGiSqe7uHUrJCBMFCu8k2xZV5j HOHmG0WPDLKjCSpcft8CIhzhFfq/xO5KkUIy52Nm9v32/S1RwMWBxlRZwXqTdG00Zl7o myGA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:subject:message-id:date:from:reply-to:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc; bh=Jo3CIcm28apt3LpTyCMSMy4boPrFwPp658fyO8+ji2A=; b=PlDXC7YGONQvcVaIKDTOdUieYHPYYucN959UgGcp/mBqLp6Of9Cm9ZtrWhIZmHrYDc uT5uaOGfoAVMSSOY3RXYAHbVp81ecLx4ryBKc94pWo5aV63/1l9Fe9BwUnbu2lQduJRT PyuB6pLiqIYuddkiROR82RYM+K7ekACCpnQYEskVQIB921tXyp36OY/kEzw/RMiJRCw+ Ng8aJOZD69Q/glClB3fu/mTmaMPCM0Y7y85DhZlb/DuawoCmTph4012XQ/mCAfpxhMXC OYekTQnR1w4VllYp4P6Bho/FND4Z0LnQ9pYnNMz0UqPSV36iw/cFdJ+9WoS6AVS/R3os VlcA== X-Gm-Message-State: ACgBeo1Xb8HsD+A/+8dz+WbevCHZuCALSKS/d8ueR9NZC9ggfBebhhH1 khx8U3AHL3IhwbNMW1I/efBsWZXVKYKoSHm6/4GH9lt6v5I= X-Google-Smtp-Source: AA6agR4ALNkOkz8JGGZkHKK1bfPnYcn8OxFPHhpJXkp+xQPBQ4/RXxM5HNc1p3/R+Ov3nJojMa3gk/qvYny2muRtqVE= X-Received: by 2002:a17:907:2cea:b0:730:c186:21a0 with SMTP id hz10-20020a1709072cea00b00730c18621a0mr3057163ejc.678.1660318530493; Fri, 12 Aug 2022 08:35:30 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Reply-To: linuxtechguy@gmail.com From: Jim Date: Fri, 12 Aug 2022 10:33:45 -0500 Message-ID: Subject: Re: out of memory error after "edit-command-line" To: devs Content-Type: multipart/alternative; boundary="00000000000039622305e60d0814" X-Seq: 50471 Archived-At: X-Loop: zsh-workers@zsh.org Errors-To: zsh-workers-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-workers-request@zsh.org X-no-archive: yes List-Id: List-Help: List-Subscribe: List-Unsubscribe: List-Post: List-Owner: List-Archive: --00000000000039622305e60d0814 Content-Type: text/plain; charset="UTF-8" Hi again, Update: Tried to isolate what causes the 'out of memory' errors and found that if I added quotes the error stopped. CL=${(0A)"$(< /proc/$P/cmdline)"} # OK CL=${(0A)$(< /proc/$P/cmdline)} # out of memory error I had another script and it worked without the quotes. Compared the two and found the other script had the option 'extendedglob' set. After adding the option to the script I attached in the original email the 'out of memory' errors stopped when there are no quotes. Not sure what globbing has to do with this. Hopefully someone can enlighten me. But even so, should zsh ever fail with an 'out of memory' error? Again, it only happens after exiting 'edit-command-line'. Regards, Jim On Mon, Aug 1, 2022 at 10:47 PM Jim wrote: > Hi everyone, > > ZSH_VERSION: 5.8 (Distribution, Devuan, still hasn't update) > $ZSH_PATCHLEVEL: debian/5.8-6+deb11u1 > default editor nvim version v0.4.4 > Also tested with VIM - Vi IMproved 8.2 > terminal emulators/multiplexer: tmux, xfce4-terminal, st, and > kitty(checked on all) > > .zshrc > autoload -Uz edit-command-line > zle -N edit-command-line > bindkey -M vicmd v edit-command-line > > Created an anonymous function(see attachment ps_via_zsh) by entering > edit-command-line > which seems to work ok after exiting editor and hitting enter. But > then(after adding code) started > getting out of memory errors(see attachment out_of_memory). When I recall > the anonymous > function from history and execute, no error. Started commenting out lines > and found that the issues > stops with the line: > > CL=${(0A)$( > commented out. Splitting line found issue to be with > CL=${(0A)$( Again, recalling from history -- no edit-command-line -- no error. > BTW: /proc//cmdline uses NULL as the separator. > > QUESTION: Bug, or am I doing something stupid? Or something with nvim and > vim? > > Thanks for listening, > > Jim Murphy > --00000000000039622305e60d0814 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi again,

Update:
=
Tried to isolate what causes the 'out of memory' err= ors and found that if
I added quotes the error stopped.
=C2=A0 CL=3D${(0A)"$(< /proc/$P/cmdline)"} =C2=A0# OK
=C2=A0 CL=3D${(0A)$(< /proc/$P/cmdline)} =C2=A0# out of memory error<= /div>

I had another script and it worked without the quo= tes. Compared the two
and found the other script had the option &= #39;extendedglob' set. After adding
the option to the script = I attached in the original email the 'out of memory'
erro= rs stopped when there are no quotes.

Not sure what= globbing has to do with this. Hopefully someone can
enlighten me= . But even so, should zsh ever fail with an 'out of memory'
error? Again, it only happens after exiting 'edit-command-line'.=

Regards,

Jim

On Mon, Aug 1, 2022 at 10:47 PM Jim <linux.tech.guy@gmail.com> wrote:
Hi everyone,
=

ZSH_VERSION: 5.8 (Distribution, Devuan, still hasn'= t update)
$ZSH_PATCHLEVEL:=C2=A0 debian/5.8-6+deb11u1
default editor nvim version v0.4.4
Also tested with VIM - Vi I= Mproved 8.2
terminal emulators/multiplexer:=C2=A0 tmux, xfce4-ter= minal, st, and kitty(checked on all)

.zshrc
=C2=A0 autoload -Uz edit-command-line
=C2=A0 zle -N edit-command= -line
=C2=A0 bindkey -M vicmd v edit-command-line

Created an anonymous function(see attachment ps_via_zsh) by entering edi= t-command-line
which seems to work ok after exiting editor and hi= tting enter. But then(after adding code) started
getting out of m= emory errors(see attachment out_of_memory).=C2=A0 When I recall the anonymo= us
function from history and execute, no error. Started commentin= g out lines and found that the issues
stops with the line:
<= div>
CL=3D${(0A)$(</proc/$P/cmdline)} ; PP=3D${AA[PPid]} ;= Cmd=3D${AA[Name]}

commented out. Splitting line f= ound issue to be with CL=3D${(0A)$(</proc/$P/cmdline)}
Again, = recalling from history -- no edit-command-line -- no error.
BTW: = /proc/<pid>/cmdline uses NULL as the separator.

QUESTION:=C2=A0 Bug, or am I doing something stupid? Or something w= ith nvim and vim?

Thanks for listening,
<= div>
Jim Murphy
--00000000000039622305e60d0814--