Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 6 Jul 2009 16:58:04 GMT
From:      paranormal <unixdevel666@gmail.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/136384: ruby oniguruma regexp 100% CPU usage and not quit.
Message-ID:  <200907061658.n66Gw4XI044515@www.freebsd.org>
Resent-Message-ID: <200907061700.n66H0DpC082824@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         136384
>Category:       ports
>Synopsis:       ruby oniguruma regexp 100% CPU usage and not quit.
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Jul 06 17:00:12 UTC 2009
>Closed-Date:
>Last-Modified:
>Originator:     paranormal
>Release:        7.2-RELEASE
>Organization:
redtram
>Environment:
FreeBSD www.paranormal.intra 7.1-RELEASE-p5 FreeBSD 7.1-RELEASE-p5 #0 r191807: Wed May  6 14:57:53 EEST 2009     root@devbsd:/usr/obj/usr/src/sys/DEVBSD  amd64

>Description:
ruby process uses 100% cpu and create core dump after Ctrl^C. This bug reproduse on all freebsd in my park. 6.... - 7...

On linux, this code work fine.
>How-To-Repeat:
install lang/ruby18 + oniguruma and try this code:

require 'open-uri'
$KCODE = 'u'

reg = %r{</div>[^<]*<div align="center">[^<]*</div>[^\:]*\:([^<]*)<div class="quote">[^<]*<div align="center">}imu
del = %r{<(?!div|/div|img)[^>]*>}iu

doc = open('http://null-team.com/windows-sborki/21148-windows-xp-lex-sp3-rus-summer-dvd-edition-final.html').read
doc.gsub!(del, ' ')

a = doc.match(reg)
p a
>Fix:


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200907061658.n66Gw4XI044515>