Boost logo

Boost Users :

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


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:

    $ g++ -o InterProcStringTest InterProcStringTest.cpp -lpthread -lrt
    $ ./InterProcStringTest
    **** no errors detected
     
    $ g++ -O2 -o InterProcStringTest InterProcStringTest.cpp -lpthread -lrt
    $ ./InterProcStringTest
    InterProcStringTest.cpp(217): test i->second == val2 failed in function: 'int test_main(int, char**)'
    i->second="x\0x", val2="xxx"
    InterProcStringTest.cpp(228): test i->second == val3 failed in function: 'int test_main(int, char**)'
    i->second="xxx\0xxxxxxxxxxxx", val3="xxxxxxxxxxxxxxxx"
    InterProcStringTest.cpp(240): test sv1 == sv3 failed in function: 'int test_main(int, char**)'
    sv1="y\0y", sv3="yyy"
    InterProcStringTest.cpp(252): test sv1 == sv5 failed in function: 'int test_main(int, char**)'
    sv1="yyy\0yy", sv5="yyyyyy"
    **** 4 errors detected

I'm testing with a more recent boost now.

Thanks again for all the eyes and suggestions, both here and on
freenet #boost!

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