From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 Received: from zero.zsh.org (zero.zsh.org [IPv6:2a02:898:31:0:48:4558:7a:7368]) by inbox.vuxu.org (Postfix) with ESMTP id 6249326AD1 for ; Thu, 29 Feb 2024 03:42:39 +0100 (CET) ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1709174559; b=Q4Mwn6jTNPLqJwxDZ9sIZqwmemCcOG/kYeQlS+FGnXMjULB8jBtP3uuU3PGrF5mwv8iyNdS2hg 8X5i/ZRtiJgqDs9a9M9yXNCRWo+6nwUKWu/pRYgvBiNe8X2DfaeLWI2Dk0zt2vDqnUTQpzBciO 89iQkx/lxFC41RyWhTow8IKyFZXB6YU6w/r05h57ZAvmy1TGVtj2CFa6/sGeXBFN6QTwNHWRxn +FI4NCQEZyA/bQ9sCgEEMXiWBkivCHIs3etwDOzcIHJkESXyfbMT5V7BxlLhN4mciQUBBdnOEx q2Yl3pZwEa0ZTM0rhR32uLcJ6/rj6cWs1g1Uc3LiifSXpQ==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-ej1-f41.google.com) smtp.remote-ip=209.85.218.41; dkim=pass header.d=brasslantern-com.20230601.gappssmtp.com header.s=20230601 header.a=rsa-sha256; dmarc=none header.from=brasslantern.com; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1709174559; bh=FImSUJwNmgGntqnzMgi4D00H+GwVcHFr8fDA68auVYg=; 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=lzTQXwj0Mt+39OBQg4+ZJgkMdClSHaFhtVSnKHaqKMgz1NofAmLOGqoXjr4NiBB91cAdH448MC B5xmUWXDBPM17PociaoMGtMevyNMnS3aM/BF20Pbe6Jd/T/i+R/gIUUyJbgAAPwh6SGNTBETzY aT9fqkZlEffR/OOSUXryvy++x2K+4RLQhgftLZmT9OfQVaMBDziSILbaZ4zOM6pnYM6zNnJg5A PtN40MP8neL8l0A0lbBUNswZ3SrnFtQbErVLLbf48Bk76k8sgmC5/qB5sRBRWPeoKlVsa/vpIA GTfH0eKRUNjJEmM68UyNCh9KY6iQeQcNI4E8EFsdB/gPHA==; 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=xhpKpPXI8NEyxejIc2gY13q9X4dhHDKOVsWjEG2yEas=; b=DgWYyEA5FaxjPaja+ntebCAxB+ gR40I64nU5jKAhZGyZ/IR6EoBLbImYc6bu+Ums2jJielBF72Wavow96y/QfqbxPaJtK7Ee1ung5Fn 2TXavlZ3ZKWpwzEKDz8yPejziwlFDfE2bD1wroxhcMqRzfZOe+J6oiC9JqkKbwAa3CqhlavWRAZVq s6/XokZ52UccqIkldD8uUrHxGZucYwobnemvOdY/4NkCaUq1GCl8CNb5HZNKxoXd3mfmGnWouFmOq r+vCzUc4a9jVVd/GQouwXCiMr3W8iO0ZvU6YrRRWobQ357lpKROjQwZFntnGGKWVlV+1muUEkySQX CSzyEjRg==; Received: by zero.zsh.org with local id 1rfWNY-000Akn-CI; Thu, 29 Feb 2024 02:42:36 +0000 Authentication-Results: zsh.org; iprev=pass (mail-ej1-f41.google.com) smtp.remote-ip=209.85.218.41; dkim=pass header.d=brasslantern-com.20230601.gappssmtp.com header.s=20230601 header.a=rsa-sha256; dmarc=none header.from=brasslantern.com; arc=none Received: from mail-ej1-f41.google.com ([209.85.218.41]:59503) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1rfWMw-000AQB-Jg; Thu, 29 Feb 2024 02:42:00 +0000 Received: by mail-ej1-f41.google.com with SMTP id a640c23a62f3a-a444205f764so14337766b.2 for ; Wed, 28 Feb 2024 18:41:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20230601.gappssmtp.com; s=20230601; t=1709174518; x=1709779318; darn=zsh.org; 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=xhpKpPXI8NEyxejIc2gY13q9X4dhHDKOVsWjEG2yEas=; b=ewnxjh2DPvNoWTHshQhAD6VqhxaD6zRaMvbElpFyWs6bn6d4EqXZ1b5G6WF2lHXu2h 9m6mJqU3XOaga07RCOvlM1BpHjWUoHjavuJMZN3S8idAYILTwf2H2Vwys4YSwFqz5pRG P/M5ILQMuc4e0Puut8D6ZHf9X2fHGTsfRahqyZRcXWFQZwHoFzMkx7tKaURgkJN8x/v2 85TjbNNEeAaS1ebZNwlj39bAdtsFRl035Eincy9Mfk3uUMYRHDZlvbz5XUfvVrqvn5m0 8YuiSuqzDhqIfNMSdgKa1AzP1LW63awYHEWrjwg/80GnTyR1YR7cU0Zl9VNDKIVqCkWG GwPg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709174518; x=1709779318; 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=xhpKpPXI8NEyxejIc2gY13q9X4dhHDKOVsWjEG2yEas=; b=QyGPHwOHIY4iFPOR/X7QQL6MxaySnhGz7YIJvlNr0yJ4LpCwWUQE8zbSa7clB98OXh wpFIJHvkRZcDqz0qIzBgRE6FquZhXztTxqjvazvv4Sfw78A4Ni+4umyYzhG7w2ClAZx+ VCW5xoOihuDm0pxM12d9lGTzJqjTZ30dhY/CtpW1F7MO9QgsnRZSyHXljN0wrjv1bN6G yJfEWVi8c/67PTEoKO3R9vdE2rcLNBVjuV24+ud0BtCAdaUAkDOZy5TdXGdEEwwt0kYO qmn21d+6RhgjXIZOMvVIdrs25QTuHAvNTdkdwV60fcnhBkmMOvwQ+aUopyZzx31ySJJx qRFQ== X-Gm-Message-State: AOJu0YyNa2E+ZglmaKnq4EYilQysD7czMEtlgsAkgzfEkfaDOoFA8PXW 2Z5jsEtX9Hv5pQc/J2Abh5l0fJoVL7bx4k0rvAubAxoIwfeLY76dKBZmrvEUimoZsx72jWgrhAQ Bm819H8I7ZjYexdH5sbOobcLiqyozNvGpHSSr X-Google-Smtp-Source: AGHT+IHDYdKvUelg0u5DSwnaPon04M/s1hLV7Pz6nXDxhNFU7EiCpOzYSjHxxXA+kWhVTZUkOiJAurSSTI850TGVqC8= X-Received: by 2002:a17:906:7189:b0:a43:87a3:3fe8 with SMTP id h9-20020a170906718900b00a4387a33fe8mr396165ejk.72.1709174517942; Wed, 28 Feb 2024 18:41:57 -0800 (PST) MIME-Version: 1.0 References: <5A8A5063-D43C-4AD0-A03E-0A5E84259FFA@kba.biglobe.ne.jp> In-Reply-To: <5A8A5063-D43C-4AD0-A03E-0A5E84259FFA@kba.biglobe.ne.jp> From: Bart Schaefer Date: Wed, 28 Feb 2024 18:41:46 -0800 Message-ID: Subject: Re: D04parameter.ztst crashes if USE_MMAP is not defined To: "Jun. T" Cc: zsh-workers@zsh.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Seq: 52638 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: On Wed, Feb 28, 2024 at 8:23=E2=80=AFAM Jun. T wrote: > > [2] The crash occurs in the test chunk > "Unsetting and recreation of tied normal parameters". > The chunk has 8 "print $STRING $string", and it crashes > at the 6th of them. valgrind says, after the 5th "print": =3D=3D608496=3D=3D Conditional jump or move depends on uninitialised value(= s) =3D=3D608496=3D=3D at 0x1D144A: paramsubst (subst.c:3822) =3D=3D608496=3D=3D by 0x1C93E2: stringsubst (subst.c:322) =3D=3D608496=3D=3D by 0x1C86BE: prefork (subst.c:142) =3D=3D608496=3D=3D by 0x152CAB: execcmd_exec (exec.c:3282) =3D=3D608496=3D=3D by 0x14F4FA: execpline2 (exec.c:2016) =3D=3D608496=3D=3D by 0x14E081: execpline (exec.c:1741) =3D=3D608496=3D=3D by 0x14D2D7: execlist (exec.c:1495) =3D=3D608496=3D=3D by 0x14C905: execode (exec.c:1276) =3D=3D608496=3D=3D by 0x15B53B: runshfunc (exec.c:6164) =3D=3D608496=3D=3D by 0x15AA51: doshfunc (exec.c:6010) =3D=3D608496=3D=3D by 0x1596FE: execshfunc (exec.c:5548) =3D=3D608496=3D=3D by 0x1590D0: execfuncdef (exec.c:5408) Line 3822 is: 3822 if (isarr > 0 && !plan9 && (!aval || !aval[0])) { That would be during one of the expansions ... STRING=3Da:b typeset -T STRING string print $STRING $string unset string STRING=3Dx:y:z print $STRING $string # ... here Minimally reproducible from Src/zsh -f with () { local STRING=3Da:b typeset -T STRING string unset string STRING=3Dx:y:z print $STRING $string } BUT! Only the first time after shell startup. Repeated calls do not produce repeated warnings from valgrind. > Maybe the crash is related with > some state of the heap? That must be it, because the heap uses mapped memory when it can and I don't see any other way HAVE_MMAP could be involved.