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 C0A3B25E00 for ; Fri, 1 Mar 2024 10:57:56 +0100 (CET) ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1709287076; b=M6WegvR1vJv5JGCYkK2oWSISg72xCHcHc+N/he2VenukTjSzjBmErS5TxB+97fRgqpjoL0SZHT 0dW7aKHUI5Lrd8SJypPB2FetCuu7UIHgLgUIKMYZrnEZ+SB6g5nygQr35Oo/ltWGcHeyJRTmwF FjxJA+DR6EoetqXavyyEaw7pU0XpDxvX+AOi3MgOIMUXisSj52afJuOp4Ixd2I0hhMHUahOboT kJolQYVj8eK82eTkG3Bfzq+PrVdYyZeBuJux/8pseksIE551oOmMWSjdx2DA1mna4PeVMmTQ8b XV8V8gTm+CeIwhFCVX/QVIQhRiQSJN9nUX9YYXYxN/81BQ==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (snd01010-bg.im.kddi.ne.jp) smtp.remote-ip=27.86.113.26; dmarc=none header.from=kba.biglobe.ne.jp; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1709287076; bh=J9w+8Q9w3T5q3hdiILGIfGpU5FGvx/iE0IUOyXdvlNI=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Message-ID:In-Reply-To:To:References:Date:Subject: MIME-Version:Content-Transfer-Encoding:Content-Type:From:DKIM-Signature; b=BJ2FycvycdUUqhncYSfg1U9lFCnwKqSQG/PuQNlAgMRQx9yYQbbTi2cEFsZXoA5Ad93L0I+zhQ RTUwlWZCZfMg3WflIRyEQ6jt0JvpH1oDCBOy513d8QDjwZbFPXiovfZZVC0CSNqq7ZIMmBfITV x1k5Ruc8dBEu3yh95SQ09C3ECqO/inag3XBB0j26HeT0IlcSLNnpktcIljR+GgX6SGALOm3ipI 9webe7ntjdmbCureRtiRQXdPQVdIpsyNX+w00rJfpQN53Z3s4Bg4R3SJ8r2qJZ/GQy4pS5TElU DkffyDsSHxCRY2U9MA9ic2fpNoMRg53iSTm10ndVgjseFQ==; 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:Message-Id:In-Reply-To:To:References: Date:Subject:Mime-Version:Content-Transfer-Encoding:Content-Type:From: Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=9kogHHO+AukuFGRCZn7eCPgOwweLo23hORKTqtDstNc=; b=gdpvB2MDn5gXkUd3cSqpXmxV6K pWfHtFIyLKjLfFPyH9GbrVjl54Cn5Ku2cWyt427bF8EUrnh1v22Ehqro54fJCPgRrwsfATGnO3Xch rPDwYPr30yAC3CNpfxsaRk0+YmjH2S3oUGx+Cf8aCcbSBMNPJPMlSLpsLEmZhn4wvA6S85d5zUPC8 NMU6P8DdM0ySqJlgWprlFj55cS5qVZNBrPBKUXQx4Ml9QLmzz3P00p3HP68G/QfZTudMBiNiy+YKQ +O9cksaKyOVp0EXWs/liIP5d2mji6DodW9h8J+JjEf8FPNzvddw/yx6RjTzZNUlOSrAm3PVhTVjYo 2S5C7iSQ==; Received: by zero.zsh.org with local id 1rfzeO-000AOg-6T; Fri, 01 Mar 2024 09:57:56 +0000 Authentication-Results: zsh.org; iprev=pass (snd01010-bg.im.kddi.ne.jp) smtp.remote-ip=27.86.113.26; dmarc=none header.from=kba.biglobe.ne.jp; arc=none Received: from snd01010-bg.im.kddi.ne.jp ([27.86.113.26]:45729 helo=dfmta1012.biglobe.ne.jp) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_256_GCM_SHA384:256) id 1rfzdo-000A32-1Q; Fri, 01 Mar 2024 09:57:22 +0000 Received: from mail.biglobe.ne.jp by omta1012.biglobe.ne.jp with ESMTP id <20240301095714827.FGDX.32237.mail.biglobe.ne.jp@biglobe.ne.jp> for ; Fri, 1 Mar 2024 18:57:14 +0900 From: Jun T Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.700.6\)) Subject: Re: D04parameter.ztst crashes if USE_MMAP is not defined Date: Fri, 1 Mar 2024 18:57:02 +0900 References: <5A8A5063-D43C-4AD0-A03E-0A5E84259FFA@kba.biglobe.ne.jp> To: zsh-workers@zsh.org In-Reply-To: Message-Id: X-Mailer: Apple Mail (2.3731.700.6) X-Biglobe-Sender: takimoto-j@kba.biglobe.ne.jp X-Seq: 52642 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: > 2024/02/29 13:19=E3=80=81Bart Schaefer = =E3=81=AE=E3=83=A1=E3=83=BC=E3=83=AB: >=20 > However, getting there is a bit questionable: >=20 > getvaluearr (v=3D0x7fffffffd120) at params.c:686 >=20 > 689 else if (PM_TYPE(v->pm->node.flags) =3D=3D PM_ARRAY) > 690 return v->arr =3D v->pm->gsu.a->getfn(v->pm); > (gdb) s > strgetfn (pm=3D0x5555555ebd95 ) at params.c:3944 >=20 > Why is gsu.a->getfn pointed at strgetfn ? I could imagine that does > the wrong thing from time to time. Why (PM_TYPE(v->pm->node.flags) =3D=3D PM_ARRAY) is true here? I believe the parameter here is 'string'. But didn't we unset it? If I add 'typeset -p string' to D04: --- a/Test/D04parameter.ztst +++ b/Test/D04parameter.ztst @@ -1222,6 +1222,7 @@ typeset -T STRING string print $STRING $string unset string + typeset -p string STRING=3Dx:y:z print $STRING $string STRING=3Da:b then it crashes at this 'typeset -p string'. Back trace is: (gdb) bt #0 0x0000557c31da6511 in quotedzputs ( s=3D0x65756e69746e6f63 , stream=3D0x154592c1b780 <_IO_2_1_stdout_>) at = utils.c:6439 #1 0x0000557c31d6aa57 in printparamvalue (p=3D0x557c323a3460, = printflags=3D544) at params.c:5996 #2 0x0000557c31d6b070 in printparamnode (hn=3D0x557c323a3460, = printflags=3D544) at params.c:6197 #3 0x0000557c31cf4c81 in bin_typeset (name=3D0x557c323bb490 "typeset",=20= argv=3D0x557c323bb4e8, assigns=3D0x0, ops=3D0x7ffd004cecf0, func=3D0) at builtin.c:3096 Line 5996 in params.c is in the block 'case PM_ARRAY:'. (gdb) up 3 #3 0x000055e433bc1c81 in bin_typeset (name=3D0x55e4359839b8 "typeset",=20= argv=3D0x55e435983a10, assigns=3D0x0, ops=3D0x7fff8a133e70, func=3D0) at builtin.c:3096 3096 paramtab->printnode(hn, printflags); (gdb) p *hn $1 =3D {next =3D 0x55e43590e870, nam =3D 0x55e43596aa60 "string", flags = =3D 1} This means getnode2() at line 3092 (builin.c) can find an array = parameter 'string' in paramtab. Moreover, if I run D04 ('typeset -p' added) with a normal zsh (i.e. with mmap), then it fails as follows: @@ -3,6 +3,7 @@ a:b a b x y z a:b a b +typeset -a string=3D( ) x:y:z a:b a b x:y:z Test ./D04parameter.ztst failed: output differs from expected as shown = above for: So even with mmap, the parameter 'string' is not removed from = paramtab...?