From: Baptiste L. <bap...@gm...> - 2013-08-05 11:58:59
|
I'm also in a corporate environment with an old RedHat and stuck with gcc 4.1.2. I do not have this issue, but I'm using our own project build system to build jsoncpp (trunk) amalgamated sources. The crash stack has the smell of incompatible compiler settings, but I don't know enough to about gcc to say for sure. I would recommend that you try using the amalgamated sources and compile with your own build system to confirm to origin of the issue. Baptiste. 2013/7/28 Joakim Hove <jo...@st...> > Hello,**** > > ** ** > > I have downloaded jsoncpp and successfully built it; I also issued the > command “scons platform=linux-gcc check” to run the tests – the all passed. > **** > > ** ** > > I then created my own program to actually test this; the program compiles > and links fine – but it goes down witn SIGSEGV when running. My program is > **** > > ** ** > > #include <json/json.h>**** > > ** ** > > void parseJson() {**** > > Json::Reader reader;**** > > }**** > > ** ** > > int main(int argc , char ** argv) {**** > > parseJson();**** > > exit(0);**** > > }**** > > ** ** > > I.e. it is very simple stuff. When I try putting the Json::Reader instance > in the boyd of main{…} it seems to work. A backtrace from gdb is inlined > below:**** > > ** ** > > #0 0x0000003a560b7672 in __gnu_cxx::__exchange_and_add () from > /usr/lib64/libstdc++.so.6**** > > #1 0x0000000000403313 in std::string::_Rep::_M_dispose > (this=0xffffffffffffffe9, __a=@0x7fff7fb14957)**** > > at > /usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/bits/basic_string.h:232 > **** > > #2 0x0000000000403360 in ~basic_string (this=0x7fff7fb14ab0)**** > > at > /usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/bits/basic_string.h:478 > **** > > #3 0x00000000004039fe in ~Reader (this=0x7fff7fb149b0) at > /private/joaho/Parser/opm-parser/external/json/json-cpp/include/json/reader.h:23 > **** > > #4 0x0000000000402aba in parseJson () at > /private/joaho/Parser/opm-parser/opm/parser/eclipse/ExternalTests/ExternalTests.cpp:50 > **** > > #5 0x0000000000402ad5 in main (argc=1, argv=0x7fff7fb14bc8)**** > > at > /private/joaho/Parser/opm-parser/opm/parser/eclipse/ExternalTests/ExternalTests.cpp:55 > **** > > ** ** > > As you can see I have a very old version of g++ (4.1.2). I am in a > corporate environment and it is quite painful to get a newer version – do > you think this can be the problem?**** > > ** ** > > Regards Joakim**** > > ** ** > > ** ** > > ------------------------------------------------------------------- > The information contained in this message may be CONFIDENTIAL and is > intended for the addressee only. Any unauthorised use, dissemination of the > information or copying of this message is prohibited. If you are not the > addressee, please notify the sender immediately by return e-mail and delete > this message. > Thank you > > > ------------------------------------------------------------------------------ > See everything from the browser to the database with AppDynamics > Get end-to-end visibility with application monitoring from AppDynamics > Isolate bottlenecks and diagnose root cause in seconds. > Start your free trial of AppDynamics Pro today! > http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk > _______________________________________________ > Jsoncpp-devel mailing list > Jso...@li... > https://lists.sourceforge.net/lists/listinfo/jsoncpp-devel > > |