Menu

Crash on failed assert on solaris

Help
Braempje
2003-03-25
2003-11-28
  • Braempje

    Braempje - 2003-03-25

    We are using cppunit in a project on a sun solaris 5.8 (sparc), and it crashes with a core dump when an assert fails. Even when I recompile and use "make check" the one test that should fail crahes.
    We have found a solution, that is to link statically, but while our project grows things start to get more difficult with static compilation.
    Is there a better solution? I have tested this problem on 2 different suns, and it's the same.

    Thx in advance

     
    • Bernardo Sana

      Bernardo Sana - 2003-05-07

      I'm not sure I undestant your problem. If you dinamically link the cppunit to your project it crashes?

      regards

      bernardo

       
    • Oliver

      Oliver - 2003-09-26

      I have the same problem on AIX 4.3.3 with CPPUNIT 1.9.11:
      e.g. CPPUNIT_ASSERT(1 == 2) or CPPUNIT_ASSERT(false) causes a crash.

      Did you find a reason/solution for this problem?

      Thanks
      Oliver

       
      • Anonymous

        Anonymous - 2003-09-26

        Well I don't know the solution but it's not just CPPUNIT_ASSERT that causes an "Abort (core dumped)" for me. g++'s assert does the same. I don't think the problem lies in cppunit itself - for my setup in any case.

        Ben.

         
    • Nick Bova

      Nick Bova - 2003-11-28

      HI

      It seems I know how to fix this proble.
      (But don't know exactly, why).

      try{
      CPPUNIT_ASSERT_DOUBLES_EQUAL(10,100,4);
      }catch(::std::exception &e)
      {
      ::std::cout << e.what();
      }

      Well, but is it possible to avoid
      handling exceptions around asserts?
      It looks not very nice, as for me.
      Do anybody solve this question?

      Nick

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.