2 Replies Latest reply on May 16, 2018 9:09 PM by Oqelu

    issues with Solaris studio 12.3


      Hi All,

      I am new here, hope someone could help me.

      I am on SunOS 5.11 11.3 sun4v sparc sun4v(Solaris studio 12.3) system. my c program is compiled without errors. while running i get errors and core dump.

      This code was working fine on SunOS 5.9.

      could someone help to me check what's wrong with code or with run time libraries.


      below is from dbx of core


      0x0007fffefdbb03b0: kpughndl0+0x0010:   clrx     [%fp + 2031]

      Current function is bulkInsertIntoTRimpMajorCalleventdetailsTable (optimized)

        202                   ROAM_NO_CHECK_DB_DATA) == ROAM_FAILURE_FLAG)

      (dbx) where                                                                 

      current thread: t@1

        [1] kpughndl0(0x100362010, 0x1001f9678, 0x4, 0x0, 0x0, 0x1000002), at 0x7fffefdbb03b0

        ---- 1 following frame from gwindows -- possible stack overflow

      =>[2] bulkInsertIntoTRimpMajorCalleventdetailsTable(DBctx = <value unavailable>) (optimized), at 0x10005d93c (line ~202) in "TRimpMajorCalleventdetails.c"

        [3] process_charge_file() (optimized), at 0x100056558 (line ~156) in "rImpControl.c"

        [4] main(argc = <value unavailable>, argv = <value unavailable>) (optimized), at 0x10004fc30 (line ~245) in "rImpMain.c"

      (dbx) quit

        • 1. Re: issues with Solaris studio 12.3
          Maxim Kartashev-Oracle

          Looks like the stack got corrupted for some reason. Could be buffer overflow or something like that. It doesn't seem that dbx's guess about overflow is right because it only showed 4 frames that look normal.

          It's impossible to say why it worked on Solaris 9 and is crashing on 11.3; the reason may not be connected with the OS version at all.

          I'd start with recompiling for debugging (preferrably without optimization) and running the program under dbx to catch it misbehaving earlier than it crashed.

          • 2. Re: issues with Solaris studio 12.3

            The culprit may be a new compiler, rather than new Operating System. It poorly treats C++ of 2014. - Many bugs.
            Try to change number of bits (32, 64), optimisation, level of C++ (..., 2011, 2014).
            Check which libraries it links to. A new library may be not compatible with the old. For a new library you may need to use a new header, and sometimes change the code substantially.