Boost logo

Boost Users :

Subject: Re: [Boost-users] [Interprocess] updating elements in vector of maps fails in optimized code
From: Viatcheslav.Sysoltsev_at_[hidden]
Date: 2011-05-12 07:36:15


> I also noticed that the described symptoms are not merely a result of
> compiler optimizations. I was experimenting with different GCC
> optimization parameters in an attempt to identify the guilty ones when I
> noticed that even when optimizations are completely turned off, some
> weird behavior "can" occur. When I run the snippet provided below,
> compiled with -O0, several times, the program behaves as expected about
> half of the times and in the other runs, the map find function will fail
> to find any entries, resulting in a matrix consisting of ones instead of
> twos. In higher optimization levels, the find function fails
> consistently.

Any chance valgrind can help? Sounds like unitialized read for me.

-- Slava


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