Boost logo

Boost Users :

Subject: [Boost-users] PB with Regex Syntax in boost::regex 1.38 cause crash with memory exhausted .
From: coord.admin (coord.admin_at_[hidden])
Date: 2009-05-13 07:00:34


Hi ,
i'm using boost::regex 1.38 and C++ to code a textfile parsor .

My code work correctly with most regular expression but i've got one problem with this expression:
^([^\s]+)\s+\d+\s+(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})\s+\w+\/(\d+)\s+\d+\s+(\w+)\s+(\w+)\:\/\/?([^\:\/\?\s]+):?(\d*)(\S*).+Referer:(.+)\\r.*$

and a file with these lines :
1237084031.249 985 10.0.0.1 TCP_MISS/200 37567 GET http://monsite.information.com/index.mas?epl=00960031UlsNZ0sAVVETVRBeHgsJRz5WClgAXlIFXAQTTEsJAFcGA1IADVUABEdRPQpcWFELVAFAUwxYVggPW1RVXQlUC1JdDF0XBlxZ - ROUNDROBIN_PARENT/10.10.10.10 text/html [Connection: Close\r\nCache-Control: no-cache,no-store\r\nPragma: No-Cache\r\nAccept: */*\r\nHost: monsite.information.com\r\nUser-Agent: XXXX/X.X (Update: XXXX X.X; UNIX)\r\nProxy-Connection: Keep-Alive\r\n] [HTTP/1.1 200 OK\r\nDate: Sun, 15 Mar 2009 02:27:10 GMT\r\nServer: Oversee Webserver v1.3.18\r\nSet-Cookie: ident=click:0%257csearch:0%257cexitpop:0%257ctoken:vqzyyyprxutxyvqs%257clload:0%257clvisit:1237084030; path=/; expires=Mon, 16-Mar-2009 02:27:10 GMT\r\nSet-Cookie: monsite.com=click:0%257csearch:0%257cexitpop:0%257clload:0%257clvisit:1237084030; path=/; expires=Mon, 16-Mar-2009 02:27:10 GMT\r\nSet-Cookie: Spusr=ac15000c6b3f49bc677e9c0b; path=/; expires=Tue, 15-Mar-11 02:27:10 GMT\r\nCache-control: private, no-cache, must-revalidate\r\nExpires: Mon, 26 Jul 1997 05:00:00 GMT\r\nPragma: no-cache\r\nP3P: policyref="http://monsite.information.com/w3c/p3p.xml", CP="NOI DSP COR ADMa OUR NOR STA"\r\nConnection: close\r\nContent-Type: text/html\r\n\r]

I've got this error message :
terminate called after throwing an instance of 'boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<std::runtime_error> >'
what(): Memory exhausted
Abandon

The problem is probably here : (\d*)(\S*).+Referer:(.+) because when i delete this part it work correctly.

I try this expression and this file with a perl script and it work correctly , but with boost not .

Can you help me ?



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net