Boost logo

Boost Users :

Subject: [Boost-users] Valgrind false positive in make_shared
From: Dave Steffen (dave.steffen_at_[hidden])
Date: 2010-11-18 11:51:04


Peter Dimov wrote:
> Frank Mori Hess wrote:
> > Another bit of info: getting rid of the static_cast in
> > boost::detail::sp_forward makes both the compiler warning and valgrind
> > error go away, although I have no idea why.
>
> Interesting... which version of GCC? Without the static_cast, it shouldn't
> compile, as rvalue references no longer bind to lvalues. In fact, I see that
> I added the static_cast in [61574] for that very reason.

  I got this bad behavior with GCC 4.4.4. It goes away with GCC
  4.2.4.

  These are the only two compilers I have at hand at the moment, but I
  can try others if it would be useful. I get very nervous when
  Valgrind is unhappy -- it's the only tool for such things that we've
  ever found to work worth a damn. :-)

  Thanks for looking in to this.

-- 
Dave Steffen, Ph.D. - Software Engineer
Numerica Corporation <http://www.numerica.us>
4850 Hahns Peak Drive, Suite 200
Loveland, Colorado 80538
main (970) 461-2000 x 227   direct (970) 612-2327
Email: dave.steffen_at_[hidden]
fax (970) 461-2004
This message and any attachments are intended only for the individual
or entity to which the message is addressed.  This is a private
message and may contain privileged information.  If you are neither
the intended recipient nor the agent responsible for delivering the
message to the intended recipient, you are hereby notified that any
review, retransmission, dissemination, or taking of any action in
reliance upon, the information in this communication is strictly
prohibited, and may be unlawful.  If you feel you have received this
communication in error, please notify me immediately by returning this
email to me and deleting it from your computer.

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