[thread] test_read_write_mutex* failures

Hi all, there are some failures at runtime for this testcase which look like this: [...] timed test, sp=0 ../../../libs/thread/test/test_read_write_mutex.cpp(293): error in "test_read_write_mutex": test w1.m_value == 10 failed ../../../libs/thread/test/test_read_write_mutex.cpp(294): error in "test_read_write_mutex": test r1.m_value == -1 failed ../../../libs/thread/test/test_read_write_mutex.cpp(295): error in "test_read_write_mutex": test r2.m_value == 10 failed I didn't investigate too much so far, but something is very strange with this: (1) If I compile this test with bjam using the Intel toolset, it fails (exactly like in the regression results). (2) If I compile this test with bjam using the vc 7.1 toolset, it passes (exactly like in the regression results). Now here comes the interesting part: (3) If I compile this test in the VS IDE using Intel Compiler, it fails, but has a slightly different output from bjam. (4) If I compile this test in the VS IDE using VC, it fails, too (!!), with the same output as above. I've already checked the compiler and linker options that are passed by bjam, there is nothing suspicious. I'll continue my investigations tomorrow, in between any ideas about where these differences could come from are _very_ appreciated! Stefan

Stefan Slapeta writes:
Stefan Slapeta wrote:
I didn't investigate too much so far, but something is very strange with this:
[...]
Fixed now. This occured due to two uninitialized local variables in read_write_mutex.cpp.
Wow, Stefan, this is wonderful! Great job, and thank you. -- Aleksey Gurtovoy MetaCommunications Engineering

"Aleksey Gurtovoy" <agurtovoy@meta-comm.com> wrote in message news:m2acvdi8e4.fsf@meta-comm.com...
Stefan Slapeta writes:
Stefan Slapeta wrote:
I didn't investigate too much so far, but something is very strange with this:
[...]
Fixed now. This occured due to two uninitialized local variables in read_write_mutex.cpp.
Wow, Stefan, this is wonderful! Great job, and thank you.
Yes, thank you. I wonder that my compiler didn't warn about the uninitialized variables, or (more likely, I guess) that I didn't notice the warnings. I still need to finish my other read/write mutex fixes (there are some problems not caught by the current unit tests) and commit them as well as the extended unit tests I've been working on (in the hopes of catching more existing problems). I can't do this until I rerun the unit tests (which I won't be able to do until this evening) and deal with any remaining errors (hopefully also this evening). But then, hopefully, the read-write mutex will be working, though I'm afraid still rather inefficient. Mike
participants (3)
-
Aleksey Gurtovoy
-
Michael Glassford
-
Stefan Slapeta