Boost logo

Boost Users :

Subject: Re: [Boost-users] [solved, somewhat] Re: [interprocess] garbage chars when extending interprocess strings?
From: Anthony Foiani (tkil_at_[hidden])
Date: 2011-07-31 20:54:03


Anthony Foiani <tkil_at_[hidden]> writes:

> Anthony Foiani <tkil_at_[hidden]> writes:
>
>> I'm having a peculiar problem with interprocess strings.
>
> Argh. It looks like it's the "-O2" setting, at least for GCC 4.5.1 +
> boost 1_44_0:

The plot thickens.

  GCC 4.5.1 (stock) + Boost 1_44_0 (stock) on Fedora 14 x86-64: garbage
  GCC 4.5.1 (stock) + Boost 1_47_0 (custom) on Fedora 14 x86-64: garbage
  GCC 4.6.0 (stock) + Boost 1_46_1 (stock) on Fedora 15 x86-64: works
  GCC 4.5.1 (custom) + Boost 1_44_0 (custom) on [custom] ppc-32: garbage

And a few other data points I had handy:

  GCC 4.4.4 (stock) + Boost 1_39_0 (stock) on Fedora 12 ppc-32: works
  GCC 4.5.1 (stock) + Boost 1_44_0 (stock) on Fedora 14 x86-32: garbage

So it looks like 4.5.1 does not play well with this code, at least not
under -O2.

Smaller test case available here:

  http://foiani.com/cpp/boost/InterProcStringTest3.cpp

For now, it looks like my workaround is to use the later compiler.
Not a huge deal, but if someone happens to be poking in the depths of
Boost.Interprocess and sees what's going on, I'd love to hear about
it.

Thanks again for everyone's time and suggestions.

Best Regards,
Tony


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