This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

gcc 4.9.2 stack unwinding issue on Solaris Sparc


We encountered some stack unwinding issue on Solaris 10/11 Sparc and it is
only when building the code (an odbc driver) in debug mode. We build gcc in
debug mode for investigation and found the instruction pointer (ip) did not
hit any call-site entry in eh_personality.cc (line 481 - 504 with code
copied below). The comments below that part of code says:

// If ip is not present in the table, call terminate. This is for // a
destructor inside a cleanup, or a library routine the compiler // was not
expecting to throw.

But it does not look like we have any destructor involved that will throw.
Does anyone have any insight on this case (strangely the release version
works)?

code from eh_personality.cpp:

// Search the call-site table for the action associated with this IP.
  while (p < info.action_table)
    {
      _Unwind_Ptr cs_start, cs_len, cs_lp;
      _uleb128_t cs_action;

      // Note that all call-site encodings are "absolute" displacements.
      p = read_encoded_value (0, info.call_site_encoding, p, &cs_start);
      p = read_encoded_value (0, info.call_site_encoding, p, &cs_len);
      p = read_encoded_value (0, info.call_site_encoding, p, &cs_lp);
      p = read_uleb128 (p, &cs_action);

      // The table is sorted, so if we've passed the ip, stop.
      if (ip < info.Start + cs_start)
    p = info.action_table;
      else if (ip < info.Start + cs_start + cs_len)
    {
      if (cs_lp)
        landing_pad = info.LPStart + cs_lp;
      if (cs_action)
        action_record = info.action_table + cs_action - 1;
      goto found_something;
    }
    }


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]