zsh-workers
 help / color / mirror / code / Atom feed
* Memory error on exporting XPC_SERVICE_NAME from a subshell
@ 2022-07-18 18:45 Varun Gandhi
  2022-07-20  0:11 ` Bart Schaefer
  0 siblings, 1 reply; 4+ messages in thread
From: Varun Gandhi @ 2022-07-18 18:45 UTC (permalink / raw)
  To: zsh-workers

[-- 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 --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-07-21 21:16 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-18 18:45 Memory error on exporting XPC_SERVICE_NAME from a subshell Varun Gandhi
2022-07-20  0:11 ` Bart Schaefer
2022-07-21  9:40   ` Jun T
2022-07-21 21:11     ` Bart Schaefer

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).