Boost logo

Boost Users :

Subject: [Boost-users] [regex] Segmentation fault on regex_search only on CentOS
From: Alessandro Candini (candini_at_[hidden])
Date: 2011-07-13 04:59:13


I have compiled the same C++ source on two machines:

1 - Ubuntu 11.04, 2.6.38-10-generic #46-Ubuntu SMP Tue Jun 28 15:07:17
UTC 2011 x86_64 x86_64 x86_64 GNU/Linux
2 - CentOS release 5.3, 2.6.18-128.1.14.el5 #1 SMP Wed Jun 17 06:40:54
EDT 2009 i686 i686 i386 GNU/Linux

On Ubuntu I have g++-4.5.2, on CentOs g++-4.4.4 and on both I have
boost-1.42.0.

My source compiles perfectly on both machines, but on the CentOS one I
get a Segmentetion Fault during the execution.

Using some prints, I found out where it happens:
...
boost::regex grepGPP("Monthly Ecosystem GPP", boost::regex::egrep);
cerr << "DEBUG BEFORE!" << endl;
boost::regex_search (currGPP, grepGPP)
cerr << "DEBUG AFTER!" << endl;
...

The segmentation fault comes during the execution of regex_search,
beacause "DEBUG AFTER" is not printed.

Any ideas on how to solve this problem?

Thanks in advance.

-- 
Alessandro Candini
MEEO S.r.l.
Via Saragat 9
I-44122 Ferrara, Italy
Tel: +39 0532 1861501
Fax: +39 0532 1861637
http://www.meeo.it
========================================
"ATTENZIONE:le informazioni contenute in questo messaggio sono
da considerarsi confidenziali ed il loro utilizzo è riservato unicamente
al destinatario sopra indicato. Chi dovesse ricevere questo messaggio
per errore è tenuto ad informare il mittente ed a rimuoverlo
definitivamente da ogni supporto elettronico o cartaceo."
"WARNING:This message contains confidential and/or proprietary
information which may be subject to privilege or immunity and which
is intended for use of its addressee only. Should you receive this
message in error, you are kindly requested to inform the sender and
to definitively remove it from any paper or electronic format."

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