This is the mail archive of the
mailing list for the GCC project.
gcc 4.9.2 stack unwinding issue on Solaris Sparc
- From: ling ling <ling dot ling dot sap at gmail dot com>
- To: gcc-help at gcc dot gnu dot org
- Date: Thu, 10 Jan 2019 12:12:32 -0800
- Subject: 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
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;
// 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)
landing_pad = info.LPStart + cs_lp;
action_record = info.action_table + cs_action - 1;