Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
5.4.1 regression: PCRE with bash_rematch
- X-seq: zsh-workers 41539
- From: Phil Pennock <zsh-workers+phil.pennock@xxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: 5.4.1 regression: PCRE with bash_rematch
- Date: Sun, 13 Aug 2017 16:49:50 -0400
- Dkim-signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=spodhuis.org; s=d201708; h=Content-Type:MIME-Version:Message-ID:Subject:To: From:Date:Sender: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:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=ubl80xetwQj2nRVSbUwAeMGN+c+k0hESFGFRhkAYqd0=; b=vqwPiufdMqo6EQmy/ImKJcYK1q 5jPBw2ktdtol7Ishq9ioYnzg6OqS/8flL0NlPSz5WcDYpByUya4Yo8Uk2yazbeycukmeBypQ6Rjic pQgvDPhNyoKjKC/GigvbGGxfDCjWvXkSTJJXO+Vv8VC3CJAQdkh7Qhh0Ml0AYFQPdwq5JKONSWiDj +0J8YIwFcbjarVjOb5VTC/Vc5x8u;
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- Openpgp: url=https://www.security.spodhuis.org/PGP/keys/0x4D1E900E14C1CC04.asc
I'm still trying to track this down, but getting what I have out there
because in checking just now, I saw that a 5.4.2 might be imminent and I
think this should block.
% /usr/local/Cellar/zsh/5.4.1/bin/zsh -f
osmium% setopt rematchpcre bash_rematch
osmium% [[ "server" =~ ^[^@:/]+$ ]]
zsh: segmentation fault (core dumped) /usr/local/Cellar/zsh/5.4.1/bin/zsh -f
One of my git utility scripts broke on me when I tried to use it today,
with 5.4.1 on macOS installed by brew. `brew switch zsh 5.3.1_1` got it
working again. With a local git-head install built with memory
debugging, I get more details.
zsh(29859,0x7fffe51263c0) malloc: *** mach_vm_map(size=18446744071562072064) failed (error code=3)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
+./git-clone-each-pdp:49> [[ "$Remote" -pcre-match ^[^@:/]+$./git-clone-each-pdp:49: fatal error: out of memory
The line is:
elif [[ "$Remote" =~ ^[^@:/]+$ ]]; then
The value of Remote is just "server" (without quotes).
rematchpcre bash_rematch and ksh_arrays are set, only the first two are
needed to reproduce under -f; actually only bash_rematch if -pcre-match
is explicit:
% /opt/zsh-devel/bin/zsh -f
osmium% setopt bash_rematch
osmium% zmodload zsh/pcre
osmium% [[ "server" -pcre-match ^[^@:/]+$ ]]
zsh: segmentation fault (core dumped) /opt/zsh-devel/bin/zsh -f
With that last one:
-------------------------------8< lldb >8-------------------------------
% lldb -c /cores/core.29982 zsh
(lldb) target create "zsh" --core "/cores/core.29982"
warning: (x86_64) /cores/core.29982 load command 367 LC_SEGMENT_64 has a fileoff + filesize (0x2d11f000) that extends beyond the end of the file (0x2d11e000), the segment will be truncated to match
warning: (x86_64) /cores/core.29982 load command 368 LC_SEGMENT_64 has a fileoff (0x2d11f000) that extends beyond the end of the file (0x2d11e000), ignoring this section
Core file '/cores/core.29982' (x86_64) was loaded.
(lldb) bt
* thread #1, stop reason = signal SIGSTOP
* frame #0: 0x0000000108abeef0 zsh`metafy + 64
frame #1: 0x0000000108c185c8 pcre.so`___lldb_unnamed_symbol4$$pcre.so + 360
frame #2: 0x0000000108c18b2b pcre.so`___lldb_unnamed_symbol5$$pcre.so + 619
frame #3: 0x0000000108a4df86 zsh`evalcond + 1254
frame #4: 0x0000000108a55992 zsh`___lldb_unnamed_symbol30$$zsh + 98
frame #5: 0x0000000108a50a61 zsh`___lldb_unnamed_symbol18$$zsh + 497
frame #6: 0x0000000108a50325 zsh`execlist + 869
frame #7: 0x0000000108a4ff93 zsh`execode + 195
frame #8: 0x0000000108a6dcfc zsh`loop + 812
frame #9: 0x0000000108a70ee4 zsh`zsh_main + 1476
frame #10: 0x00007fffdc212235 libdyld.dylib`start + 1
frame #11: 0x00007fffdc212235 libdyld.dylib`start + 1
-------------------------------8< lldb >8-------------------------------
Messages sorted by:
Reverse Date,
Date,
Thread,
Author