zsh-workers
 help / color / mirror / code / Atom feed
* segfault/hangs with regexes, or due some other parsing issue...
@ 2011-12-27 13:04 Moritz Bunkus
  2011-12-27 13:50 ` Mikael Magnusson
  2011-12-27 17:25 ` Peter Stephenson
  0 siblings, 2 replies; 4+ messages in thread
From: Moritz Bunkus @ 2011-12-27 13:04 UTC (permalink / raw)
  To: zsh-workers


[-- Attachment #1.1: Type: text/plain, Size: 2952 bytes --]

Hey,

sorry for the vague subject. I've been trying to narrow this down to a
shorter test case but was unsuccessful.

zsh 4.3.11 (x86_64-unknown-linux-gnu) on Ubuntu 11.10 (Ubuntu's stock
package)

The attached script zsh-bug1.sh has serious issues ranging from zsh
segfaulting to it simply hanging. Different outcomes (segfault vs
hanging) can be achieved with small modifications. It should run
everywhere (it doesn't rely on a certain directory structure being
present). I've run it with "zsh -f zsh-bug1.sh", and it hangs directly
after outputting "looping" (it should simply exist afterwards,
obviously).

If I run its "proper" version (zsh-bug2.sh), e.g. replcae
"/doesnotexistdamnit" with the actual directory name, then it actually
segfaults:

--------------------------------------------------
[0 root@ls-bs-ws4 /daten/kundenprojekte] zsh -x -f ~mbunkus/test/zsh-bug2.sh
+/etc/zsh/zshenv:15> [[ -z /opt/rvm/gems/ruby-1.9.2-
p180/bin:/opt/rvm/gems/ruby-1.9.2-p180@global/bin:/opt/rvm/rubies/ruby-1.9.2-
p180/bin:/opt/rvm/bin:/root/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/X11R6/bin:/usr/local-
ls-bs-ws4/bin || /opt/rvm/gems/ruby-1.9.2-p180/bin:/opt/rvm/gems/ruby-1.9.2-
p180@global/bin:/opt/rvm/rubies/ruby-1.9.2-
p180/bin:/opt/rvm/bin:/root/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/X11R6/bin:/usr/local-
ls-bs-ws4/bin == /bin:/usr/bin ]]
+/home/mbunkus/test/zsh-bug2.sh:3> set -e
+/home/mbunkus/test/zsh-bug2.sh:4> setopt noclobber null_glob re_match_pcre
+/home/mbunkus/test/zsh-bug2.sh:25> process_dir dummy /root
+process_dir:2> local 'target=dummy'
+process_dir:3> shift
+process_dir:5> [[ ! -z /root ]]
+process_dir:6> [[ -d /root ]]
+process_dir:7> entries=( /root/essentials.txt '/root/essentials.txt~' 
/root/mysqldump.sql /root/packages.txt /root/pg_dumpall_5432.sql /root/.alias 
/root/.aptitude /root/.bash_history /root/.bashrc /root/.cache /root/.ccache 
/root/.gem /root/.gnupg /root/.inputrc /root/.joe_state /root/.lesshst 
/root/.local /root/.my.cnf /root/.mysql_history /root/.profile 
/root/.psql_history /root/.pulse /root/.pulse-cookie /root/.rvmrc 
/root/.screenrc /root/.screenrc-mbunkus /root/.ssh /root/.tramp_history 
/root/.Xauthority /root/.zsh /root/.zshenv /root/.zshhistfile )
+process_dir:8> [[ 32 -eq 0 ]]
+process_dir:11> print -- dummy//root
dummy//root
+process_dir:15> shift
+process_dir:5> [[ ! -z '' ]]
zsh: segmentation fault  zsh -x -f ~mbunkus/test/zsh-bug2.sh
--------------------------------------------------

Note that it happens whether I run as root or as a normal user.

Kind regards,
Moritz Bunkus

-- 
Dipl.-Inform. Moritz Bunkus
Prokurist/CTO

LINET Services GmbH | Am Alten Bahnhof 4b | 38122 Braunschweig
Tel. 0531-180508-0  | Fax 0531-180508-29  | http://www.linet-services.de

Geschäftsführung: Philip Reetz und Torsten Börner
HR B 9170 Amtsgericht Braunschweig

[-- Attachment #1.2: zsh-bug1.sh --]
[-- Type: application/x-shellscript, Size: 1272 bytes --]

[-- Attachment #1.3: zsh-bug2.sh --]
[-- Type: application/x-shellscript, Size: 1205 bytes --]

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

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

* Re: segfault/hangs with regexes, or due some other parsing issue...
  2011-12-27 13:04 segfault/hangs with regexes, or due some other parsing issue Moritz Bunkus
@ 2011-12-27 13:50 ` Mikael Magnusson
  2011-12-27 14:44   ` Moritz Bunkus
  2011-12-27 17:25 ` Peter Stephenson
  1 sibling, 1 reply; 4+ messages in thread
From: Mikael Magnusson @ 2011-12-27 13:50 UTC (permalink / raw)
  To: Moritz Bunkus; +Cc: zsh-workers

On 27 December 2011 14:04, Moritz Bunkus <m.bunkus@linet-services.de> wrote:
> Hey,
>
> sorry for the vague subject. I've been trying to narrow this down to a
> shorter test case but was unsuccessful.
>
> zsh 4.3.11 (x86_64-unknown-linux-gnu) on Ubuntu 11.10 (Ubuntu's stock
> package)

This bug is fixed in newer zsh versions already.

-- 
Mikael Magnusson


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

* Re: segfault/hangs with regexes, or due some other parsing issue...
  2011-12-27 13:50 ` Mikael Magnusson
@ 2011-12-27 14:44   ` Moritz Bunkus
  0 siblings, 0 replies; 4+ messages in thread
From: Moritz Bunkus @ 2011-12-27 14:44 UTC (permalink / raw)
  To: zsh-workers

[-- Attachment #1: Type: text/plain, Size: 509 bytes --]

Hey,

On Tuesday 27 December 2011 14:50:56 Mikael Magnusson wrote:

> This bug is fixed in newer zsh versions already.

Great. Thanks for the fast reply, and it is indeed working with 4.3.15.

Kind regards,
Moritz Bunkus
-- 
Dipl.-Inform. Moritz Bunkus
Prokurist/CTO

LINET Services GmbH | Am Alten Bahnhof 4b | 38122 Braunschweig
Tel. 0531-180508-0  | Fax 0531-180508-29  | http://www.linet-services.de

Geschäftsführung: Philip Reetz und Torsten Börner
HR B 9170 Amtsgericht Braunschweig

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

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

* Re: segfault/hangs with regexes, or due some other parsing issue...
  2011-12-27 13:04 segfault/hangs with regexes, or due some other parsing issue Moritz Bunkus
  2011-12-27 13:50 ` Mikael Magnusson
@ 2011-12-27 17:25 ` Peter Stephenson
  1 sibling, 0 replies; 4+ messages in thread
From: Peter Stephenson @ 2011-12-27 17:25 UTC (permalink / raw)
  To: Moritz Bunkus, zsh workers



Moritz Bunkus <m.bunkus@linet-services.de> wrote:

>zsh 4.3.11 (x86_64-unknown-linux-gnu) on Ubuntu 11.10 (Ubuntu's stock
>package)

It's definitely worth trying 4.3.15 since this code has changed; however,
there is still a known problem in regular expressions involving 8-bit
characters, so it could also be that.

It's not immediately reproducible on my system, so if it's still present
a core backtrace might be useful.

pws
-- 
Sent from my Android phone with K-9 Mail. Please excuse my brevity.


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

end of thread, other threads:[~2011-12-27 17:26 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-12-27 13:04 segfault/hangs with regexes, or due some other parsing issue Moritz Bunkus
2011-12-27 13:50 ` Mikael Magnusson
2011-12-27 14:44   ` Moritz Bunkus
2011-12-27 17:25 ` Peter Stephenson

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