Boost logo

Boost Users :

Subject: [Boost-users] Asio example 5 sagmentation fault
From: Alessandro Candini (candini_at_[hidden])
Date: 2011-08-31 03:15:40


I'm really interested in exemple 5 of boost asio:

http://www.boost.org/doc/libs/1_47_0/doc/html/boost_asio/tutorial/tuttimer5/src.html

I've tried it with boost-1.47.0. I can compile without warnings using:

g++ -Wall -pedantic -lboost_thread -lboost_system -o timer5 timer5.cpp

but when I launch the executable it gives me a Segmentation fault.

Commenting the code I found that the segmentation fault raise at the 3rd
line of main:

boost::thread t(boost::bind(&boost::asio::io_service::run, &io));

I'm trying on the following machine:
Linux office-007 2.6.38-11-generic #48-Ubuntu SMP Fri Jul 29 19:02:55
UTC 2011 x86_64 x86_64 x86_64 GNU/Linux

Can anyone help me?

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