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,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 15866 invoked from network); 29 Apr 2023 10:53:40 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 29 Apr 2023 10:53:40 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1682765620; b=YE/58UXriFf8ciZAjyh+h4TnlNb30xAiFIigFH94n2kAm8DCz6b8MXDQthghjLG7u2Ac+H1783 l0cMShhR0+qegauYwPwAugT5wmHEq+XlJrvtQ1shtC08ixvIJLVQD20S2PNeIPY2WiROnWzJkV 54ImOpx0eRtDDc1IuJuT/U/purS89cttEGBkmIhW1iJtpdh/pjZHahOUM3Juy1+BXLOlNSlwGq i89LlYteCbMLwUrpn81ce0uu5aFcugnCGsZl2TDt5J0tMz6mtxK4yhY+V94D7vNlvZqdce669A gdAhF9gK3U+1mW3vQqAx2bkrmBrnzKVb7w6RTmHd7pfbaw==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-lf1-f43.google.com) smtp.remote-ip=209.85.167.43; dkim=pass header.d=gmail.com header.s=20221208 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=1682765620; bh=UOjTO7XEPV6OFZe3ZXLQovxTXqoucwIgIsEc0txdQ00=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Transfer-Encoding:Content-Type:Cc:To:Subject: Message-ID:Date:From:In-Reply-To:References:MIME-Version:DKIM-Signature: DKIM-Signature; b=qIrVXyh7kYeJj4Y2D40kUuj7eeQo1+Z9SLfVxp+RDu/X2a14PObqh99Ur5fBMukiVuKUu1MbcF ZZ1lGLH/OAJeEBHs4h+xe5rlYbbVJtZg0upyecM0dy6LT1qUawGNjIJFcMwTCktgcRk3KptLVU J06yIrISkFpbrP/4mzmI1HF+wHiyKMFTirhStCKK0ywGsNKeox7+SO+FydEe6BM+5lPfn6Shyb a5tIYKUk27M8NHirRTDBrL5EIQR+2UPFnxf5yN05dCWUBiqvIgtgmRnfHxQTOttqyKYlKU19Hm G9Jo97XaIFnj5aSkbajdzRN0CZV9EWsYtuqS/wylvoVDjA==; 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-Transfer-Encoding: Content-Type:Cc:To:Subject:Message-ID:Date:From:In-Reply-To:References: MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=YCqIn0SxVGFuKKyCs/uYv/jOXkpPlIinl6SQgsy8xiU=; b=fO9xCisvWYFHwyT2jAD7SMRkXK zI69oDvELHNaF3AIp7x93FzAMTufNRfOmXpucM9fJTcck6b1kqM3JMENnFjKfiulNw3p8vXSq7/7f 23Afz8j3z8jgyLWZ+NFWEdtRBh9f3XqKeBUI2tCGdElAwC94D0MGMOe2ULF3utm96ba1q4K0beYeg k0JAspAuAJ4scBtJSG762Ux/7Vi1LpnTGBBdX+7jAPJ8oo9FOtVlAIBTZ0BuVb6FuXXVYozpuF7AU erNyuIqw28X+JKQ73lFWVh/8JUXlChUnhJX3q9jhFTZjpm+t1s0Q/hCjV/EemxD+2ePE25KrauzgF qSLtjZ8g==; Received: by zero.zsh.org with local id 1psiCv-0000BY-QZ; Sat, 29 Apr 2023 10:53:37 +0000 Authentication-Results: zsh.org; iprev=pass (mail-lf1-f43.google.com) smtp.remote-ip=209.85.167.43; dkim=pass header.d=gmail.com header.s=20221208 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none Received: from mail-lf1-f43.google.com ([209.85.167.43]:53645) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1psiCJ-000Prs-P2; Sat, 29 Apr 2023 10:53:00 +0000 Received: by mail-lf1-f43.google.com with SMTP id 2adb3069b0e04-4eff055d4d3so999153e87.3 for ; Sat, 29 Apr 2023 03:52:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1682765579; x=1685357579; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=YCqIn0SxVGFuKKyCs/uYv/jOXkpPlIinl6SQgsy8xiU=; b=HUUuiBR++IMe6tLUEayZkwsWubiQ9Edo8L5/krLvWDrCGKo8vqfMnigUW1MudQcVps 9pXZbqXeoJ/WymkDn+s4g2nsSPqiy9jSkTbId4TLd4p07+IlBAEOeeVnbPEi2IjiJ4Ny uNhB/8Y37I0YUAu8S1dCBOCUJhuyxyZLAM/lxixsRDqXs1V2FaLzGnSzWrDsct6IkgcK W28rZJw37tLeY+TeQQuscQDdr4xnUpE+AVKv00IClo62nYT5BHGICeusJFUWVr+O+1Ad /khWfh/g0c1Q6QmiNEwBYbXvHbXnPCO+Emi+cNbd0Bfsz5MEKVdr59yG1p4+2QxvCBCd p3XA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682765579; x=1685357579; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=YCqIn0SxVGFuKKyCs/uYv/jOXkpPlIinl6SQgsy8xiU=; b=FgEZY56vYJynaoEqc0q+FKJX9mAxOiRGcMC6KIaHoEd/+qpYE03EGVw3oxkkXCUhQb y1MbrvZMXgD0yosaI1zB/b4u3a/bxcG2BBmudZX8N/uQYCND1YpkBLKzFpNviRexrdvc YRnbGOUyLye+wYbbNrwAAKuUQM/B+AxuJfkQ63Kv5GmIN01YMI1QhN4buJ7Rsck1G4IR CVFMyg34Qm1f3uxfvBja/E0yC+P4sP3PCZmL4uNHeFaLkvcAqrXZd8wtCEvuPEawYGXz Le+QmEdBmlgDn4d26z5iIZSOOmlFUYSo0tSLgjbMbBbcuRwjqCgaWGmqgH/YDjd//nhp jT1g== X-Gm-Message-State: AC+VfDydVlwILxvLet3ySViStedCxX9hCs7t7zK+SOi9SDu2q1xQhpwJ dpojOnF4J1CUKaRKyUKfJmQhn91KSrAOCkQIwas= X-Google-Smtp-Source: ACHHUZ5Bp3S89JSxVqo7zYIwkjPDkqIvgdr/auoNyPfnJiESlJwHknDWvFulal/Wt4jzLfuxwl/xpbrxh4fsqfL9iI4= X-Received: by 2002:a19:ee05:0:b0:4ec:8cc2:b6f3 with SMTP id g5-20020a19ee05000000b004ec8cc2b6f3mr2158410lfb.3.1682765578778; Sat, 29 Apr 2023 03:52:58 -0700 (PDT) MIME-Version: 1.0 References: <886115150.3264962.1682430985767@mail.virginmedia.com> <384683842.2892075.1682682065470@mail.virginmedia.com> <1209713483.9390210.1682691745248@mail.virginmedia.com> In-Reply-To: <1209713483.9390210.1682691745248@mail.virginmedia.com> From: Sebastian Gniazdowski Date: Sat, 29 Apr 2023 10:52:32 +0000 Message-ID: Subject: Re: [BUG] sigsegv To: Peter Stephenson Cc: Zsh hackers list Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Seq: 51679 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: It says "incomplete sequence \339" although egrep $'\330' ~/.zhistory doesn't return anything=E2=80=A6 (gdb) frame #1 0x00007ffff7e1f628 in histwgetfn (pm=3D0x508f70) at parameter.c:1241 1241 addlinknode(l, dupstring(h)); (gdb) l 1236 for (iw =3D he->nwords - 1; iw >=3D 0; iw--) { 1237 h =3D he->node.nam + he->words[iw * 2]; 1238 e =3D he->node.nam + he->words[iw * 2 + 1]; 1239 sav =3D *e; 1240 *e =3D '\0'; 1241 addlinknode(l, dupstring(h)); 1242 *e =3D sav; 1243 } 1244 he =3D up_histent(he); 1245 } (gdb) p he->node.nam + he->words[iw*2] $31 =3D 0x7ffff7ae1370 (gdb) p he->node.nam + he->words[iw*2+1] $32 =3D 0x7ffff7ae1371 "" (gdb) p he->node.nam + he->words[(iw-1)*2] $33 =3D 0x7ffff7ae134f "" (gdb) p he->node.nam + he->words[(iw-1)*2+1] $34 =3D 0x7ffff7ae1370 I agree that the resilience to incomplete chars should be strengthened. Is iw the event number? (gdb) p iw $35 =3D 51475 Because history 51474 doesn't return any \330 char either: 51474 angel open 51475 angel open 51476 angel open On Fri, 28 Apr 2023 at 14:22, Peter Stephenson wrote: > > > On 28/04/2023 15:13 Sebastian Gniazdowski wrot= e: > > I'm searching for an empty word, i.e.: I'm just pressing alt-/ right > > after the shell has started. > > The crash is when the shell is putting together what's already in your > history into a set of words, so it can use them from completing. If > you look at the string that is being pared in "bufferwords" at the > point of the crash, which comes from the history entry "he", you should > see a line from your previous command line history. That's probably > causing the shell some problems --- although there's always the > possibility it might be a previous history entry that's messed things > up, but this is the place to look first. > > What you're searching for / completing probably isn't all that important. > > Hmm, come to think of it a bit of safety combined with a DPUTS() might > help with both aspects --- I'll see if I've got time for that over > the weekend. > > pws > --=20 Best regards, Sebastian Gniazdowski