Re: [Boost-users] [wave] assertion failed - multithread issue?

From: Hartmut Kaiser
Subject: Re: [wave] assertion failed - multithread issue? Newsgroups: gmane.comp.lib.boost..user Date: 2009-03-09 14:55:58 GMT (41 minutes ago)
when parsing some cpp files via boost.wave using multiple threads, I randomly get a failed assertion.
"Assertion failed: static_cast<RefCountType>(*d.begin()) != 0, file C:\projekte\libs\boost\include\boost- 1_38/boost/wave/util/flex_string.hpp, line 1216"
I am pretty sure that this is a multi-thread issue, as when using only one thread to parse the files, everything works fine. Unfortunately I cannot give you more specific information as I cannot get gdb to run on my system. I am using gcc 4.3.3
That certainly makes it almost impossible to reproduce the problem for me.
But one note: if you're using Wave in a multithreaded context (i.e. using the same Wave context/iterators from different threads) you certainly need to properly lock the Wave objects as these are not thread safe per se. The only thing guaranteed is that Wave doesn't use any (not protected) global data structures internally.. So, as long as a certain wave context/iterator instance is used from one thread only (even in multi threaded applications), you should be fine.
HTH Regards Hartmut Hello Hartmut
I use seperate wave instances for each thread. Anyway, I'll try to get gdb running and debug the problem. Nontheless there is another problem(?) in wave. Wave still uses the old filesystem interface, which makes it incompatible with code compiled with BOOST_FILESYSTEM_NO_DEPRECATED. That is a bug, right? Thank you

I use seperate wave instances for each thread. Anyway, I'll try to get gdb running and debug the problem.
Thanks! Any hint is highly appreciated.
Nontheless there is another problem(?) in wave. Wave still uses the old filesystem interface, which makes it incompatible with code compiled with BOOST_FILESYSTEM_NO_DEPRECATED. That is a bug, right?
Ohh, I was not aware of that. How can I reproduce this? Regards Hartmut
participants (2)
-
Ein Held
-
Hartmut Kaiser