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.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, HTML_MESSAGE,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 16532 invoked from network); 18 Jul 2022 18:46:33 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 18 Jul 2022 18:46:33 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1658169993; b=Um4eKY0TSSwi7XbpB38sMYQIzumhqgwZwGRw63VRcMQX3fQuuDQinWUcYf3EOcoXOR9H5ILRJq IN03hpa2spVnYsfxf+l6+E+EgqNAxA/ZKtUME9+HzhS+1JuIQIN3BrCJOiIAhxpmIt5xpV1j/Y hZvJEz6hBJAl8/QyJz2U8Eh5Emugu1XkvKEIt8ugAw4WwzLQIfbtyQr6yBb7IcTHSUzCmAmizu Nsdysv/sVul4KFXR6clBBANPOGE+zvc782Za2udFJS6OuAd/72CvOGeDo2qePNRPM7KJDskhc2 nD1t5/Sk4rtD/NZOcfcFZIdaZ/qDlshfTtu7waYzkyhYcg==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (out5-smtp.messagingengine.com) smtp.remote-ip=66.111.4.29; dkim=pass header.d=cutcul.us header.s=fm2 header.a=rsa-sha256; dkim=pass header.d=messagingengine.com header.s=fm3 header.a=rsa-sha256; dmarc=none header.from=cutcul.us; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1658169993; bh=6A99Vlg5D5LfuAY/g6UfQ04AJI0gJqwe08qv/N0nx3o=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Type:Subject:To:From:Date:Message-ID:MIME-Version: DKIM-Signature:DKIM-Signature:DKIM-Signature; b=ogy6Y4eHz6VbZqk88Zc5yXlVoSZa9d2g3cUfx3ir+NgDlNVPbu2MadVqsUNDuAL36m4ZHNiWEr 4367a/wwfbk8LeYNPymLBRF7EAC88km7dqI9FQU57OcLbKGXdvoZ1Q8NFvptsNU0ANxepW49+Z MF7WwtrYpc3xJW3PZ+UDeuz8HfkQ1HYV7ecoYz/kWzGVw8Hn+aC4dz7c8Z1WNQemdpjaS68OpI sO67JGoEmSbeIj4xREA/IEnhifxkWO6khCuuyzYxghVRtQ8Bq1mKz7VIhVX+ogl3gciY87xy8l AKxq6EY1t/sSpyTtRk9lhDsbxhR6P2CveSr4rSAGZjxrNw==; 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:Subject:To:From:Date: Message-Id:Mime-Version:Reply-To:Cc:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References; bh=HmeerWSdZZm4ARswVMaUG1LKIyCHuFEINfaYG1NVpHY=; b=Bx9NMWrJlw9LLUbuNHtxHyWru4 2uHh7NXinCbCJXFraCcPOFJGfFkH34pQ70uxqHy66W/CmhH/90gKMkIP7SY6VIuPAJc8dQMWjlQMh Y4s+k/uXTyEGoSidu8abgscQUF3cV+7j8Db3UC33COoog7kGmtsqpl6iSyGqNhZ8TUT/otoJX7p76 eEDGZNAr/29LzHiZ2VnOie+TZM0AxoE+DXCB/XjdH+/fophzpicpYPXuyC79osBaWYb2GJd2EBMJM GOM0ZvsigXEIB+4bkj1pcIAMyGGm717CMX2ZX1fP5TwkS2R5kVETMhrGVbtxvH/oe9IGaC5M96k/c UJ/IeuFg==; Received: from authenticated user by zero.zsh.org with local id 1oDVlJ-000MeB-5a; Mon, 18 Jul 2022 18:46:33 +0000 Authentication-Results: zsh.org; iprev=pass (out5-smtp.messagingengine.com) smtp.remote-ip=66.111.4.29; dkim=pass header.d=cutcul.us header.s=fm2 header.a=rsa-sha256; dkim=pass header.d=messagingengine.com header.s=fm3 header.a=rsa-sha256; dmarc=none header.from=cutcul.us; arc=none Received: from out5-smtp.messagingengine.com ([66.111.4.29]:59255) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_256_GCM_SHA384:256) id 1oDVkw-000MJV-R0; Mon, 18 Jul 2022 18:46:12 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 7652D5C00C1 for ; Mon, 18 Jul 2022 14:46:09 -0400 (EDT) Received: from imap42 ([10.202.2.92]) by compute5.internal (MEProxy); Mon, 18 Jul 2022 14:46:09 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cutcul.us; h=cc :content-type:date:date:from:from:in-reply-to:message-id :mime-version:reply-to:sender:subject:subject:to:to; s=fm2; t= 1658169969; x=1658256369; bh=HmeerWSdZZm4ARswVMaUG1LKIyCHuFEINfa YG1NVpHY=; b=oSczOsfYZLkBUVyXYbROO8IdptWMYj8oMlHr0p/B4gIqQTg7Wox EFAG7QxQIBYokxCs0swD1tkw5bT4SrNpcGw/rEqGVXoQyFOnyMU6o1Dv8fLR+C0K drc1k2GtWvjSfLiFoPxu7Ns8Rsj18qHLWLRKAJvM2C/3CVse4HSS8eRjIm0OyKWY WkPPHVVM9GnWn0r2m7a25tPdRVVcbO6oKqIMgRCrsjIXKLk5YBZay6KRjQO5D4q9 5dfB8jStR4/LS+eDf5CKHi7g5jpGjFQVtk7GhM8xFx/EUOY0rAW4DNii108P8t4T AGX/TMXiaCNTpQlV4Sb9oQgxT5lAGFmVquw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:date:feedback-id :feedback-id:from:from:in-reply-to:message-id:mime-version :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1658169969; x= 1658256369; bh=HmeerWSdZZm4ARswVMaUG1LKIyCHuFEINfaYG1NVpHY=; b=A Qp8D7QSIkbh2C3MBuvqMqz/DQMgALcDif+bAx0Cn7KdfLDxlzVxWvwCh+b+9TRyo g+5asJNl04WvVSkco1CUrqSKUs7seVoVcaVIGTRzhxPzqr8aUfQlQOcTJE1VpxDM cQvyrDWAjBZjH0Pds90HJH1xVZqdlVbRBhVYRIn24XVjWJAREoNcP/legj/FetUN 1jPePvfTNqAmiPBPRhII9LgOpCVLws658jCiCZotVD+Oqehx9j4hFLGOrzQKlX0e BXvWacfPj30zzcozj34bqTtVdhFQ//hJUV6jj+x6CGLqejKNMRHLhJaUiAsoSy+V k0St9eSUDZyvwlcOWPT5Q== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrudekkedguddviecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecunecujfgurhepofgfggfkfffhvffutgesrgdtre erreerjeenucfhrhhomhepfdggrghruhhnucfirghnughhihdfuceovhgrrhhunhestghu thgtuhhlrdhusheqnecuggftrfgrthhtvghrnhepfedvkeekuedvudeuleejtddvvdehud ejfeekueegfeejjefhjeeuteevjeekgeffnecuvehluhhsthgvrhfuihiivgeptdenucfr rghrrghmpehmrghilhhfrhhomhepvhgrrhhunhestghuthgtuhhlrdhush X-ME-Proxy: Feedback-ID: i55e1444e:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id 35E6ABC0073; Mon, 18 Jul 2022 14:46:09 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.7.0-alpha0-755-g3e1da8b93f-fm-20220708.002-g3e1da8b9 Mime-Version: 1.0 Message-Id: Date: Tue, 19 Jul 2022 02:45:47 +0800 From: "Varun Gandhi" To: zsh-workers@zsh.org Subject: Memory error on exporting XPC_SERVICE_NAME from a subshell Content-Type: multipart/alternative; boundary=ab0754affde64328a237ce31efcc096f X-Seq: 50415 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: --ab0754affde64328a237ce31efcc096f Content-Type: text/plain;charset=utf-8 Content-Transfer-Encoding: quoted-printable Hey folks, While bisecting my shell configuration for an unrelated issue, I ran int= o what looks like a use-after-free on exporting XPC_SERVICE_NAME from a = subshell. Minimized example shown below: =E2=9D=AF env -i -S'XPC_SERVICE_NAME=3D0' zsh --no-rcs Varuns-MacBook-Pro% export HOME=3D/Users/varun LOGNAME=3Dvarun OLDPWD=3D/Users/varun PWD=3D/Users/varun SHLVL=3D1 XPC_SERVICE_NAME=3D0 Varuns-MacBook-Pro% (export XPC_SERVICE_NAME=3D0) zsh(29836,0x104d1c580) malloc: *** error for object 0x14c9043d0: pointer= being freed was not allocated zsh(29836,0x104d1c580) malloc: *** set a breakpoint in malloc_error_brea= k to debug zsh: abort ( export XPC_SERVICE_NAME=3D0 ; ) Configuration information: - zsh 5.8.1 (x86_64-apple-darwin21.0) (from /bin/zsh). This bug doesn't = seem arch-specific, but I'll note that the x86_64 in the version is misl= eading, the binary is a universal one (arm64e + x86_64). - macOS 12.4 (21F79) running on an M1 Mac. Let me know if you're having trouble reproducing the issue. Cheers, Varun --ab0754affde64328a237ce31efcc096f Content-Type: text/html;charset=utf-8 Content-Transfer-Encoding: quoted-printable
Hey folks,
<= /div>

While bisecting my shell configuration for an u= nrelated issue, I ran into what looks like a use-after-free on exporting= XPC_SERVICE_NAME from a subshell. Minimized example shown below:

=E2=9D=AF env -i -S'XPC_SERVICE_NAME=3D0' zsh --n= o-rcs
Varuns-MacBook-Pro% export
HOME=3D/Use= rs/varun
LOGNAME=3Dvarun
OLDPWD=3D/Users/var= un
PWD=3D/Users/varun
SHLVL=3D1
XPC_SERVICE_NAME=3D0
Varuns-MacBook-Pro% (export XPC_SER= VICE_NAME=3D0)
zsh(29836,0x104d1c580) malloc: *** error fo= r object 0x14c9043d0: pointer being freed was not allocated
zsh(29836,0x104d1c580) malloc: *** set a breakpoint in malloc_error_br= eak to debug
zsh: abort      ( ex= port XPC_SERVICE_NAME=3D0 ; )

Configuration= information:
- zsh 5.8.1 (x86_64-apple-darwin21.0) (from = /bin/zsh). This bug doesn't seem arch-specific, but I'll note that the x= 86_64 in the version is misleading, the binary is a universal one (arm64= e + x86_64).
- macOS 12.4 (21F79) running on an M1 Mac.

Let me know if you're having trouble reproduc= ing the issue.

Cheers,
Varun<= br>
--ab0754affde64328a237ce31efcc096f--