From: "Varun Gandhi" <varun@cutcul.us>
To: zsh-workers@zsh.org
Subject: Memory error on exporting XPC_SERVICE_NAME from a subshell
Date: Tue, 19 Jul 2022 02:45:47 +0800 [thread overview]
Message-ID: <a6645184-edc4-454c-9302-2784ada23f6b@www.fastmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 1021 bytes --]
Hey folks,
While bisecting my shell configuration for an unrelated issue, I ran into what looks like a use-after-free on exporting XPC_SERVICE_NAME from a subshell. Minimized example shown below:
❯ env -i -S'XPC_SERVICE_NAME=0' zsh --no-rcs
Varuns-MacBook-Pro% export
HOME=/Users/varun
LOGNAME=varun
OLDPWD=/Users/varun
PWD=/Users/varun
SHLVL=1
XPC_SERVICE_NAME=0
Varuns-MacBook-Pro% (export XPC_SERVICE_NAME=0)
zsh(29836,0x104d1c580) malloc: *** error for object 0x14c9043d0: pointer being freed was not allocated
zsh(29836,0x104d1c580) malloc: *** set a breakpoint in malloc_error_break to debug
zsh: abort ( export XPC_SERVICE_NAME=0 ; )
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 misleading, 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
[-- Attachment #2: Type: text/html, Size: 1509 bytes --]
next reply other threads:[~2022-07-18 18:46 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-18 18:45 Varun Gandhi [this message]
2022-07-20 0:11 ` Bart Schaefer
2022-07-21 9:40 ` Jun T
2022-07-21 21:11 ` Bart Schaefer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=a6645184-edc4-454c-9302-2784ada23f6b@www.fastmail.com \
--to=varun@cutcul.us \
--cc=zsh-workers@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).