From: Phil Pennock <zsh-workers+phil.pennock@spodhuis.org>
To: zsh-workers@zsh.org
Subject: 5.4.1 regression: PCRE with bash_rematch
Date: Sun, 13 Aug 2017 16:49:50 -0400 [thread overview]
Message-ID: <20170813204949.GA98824@tower.spodhuis.org> (raw)
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-------------------------------
next reply other threads:[~2017-08-13 20:50 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-13 20:49 Phil Pennock [this message]
2017-08-13 21:12 ` Phil Pennock
2017-08-13 22:18 ` [PATCH] Repair BASH_REMATCH with no substrings Phil Pennock
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=20170813204949.GA98824@tower.spodhuis.org \
--to=zsh-workers+phil.pennock@spodhuis.org \
--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).