+2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR libgcc/85334
+ * g++.dg/torture/pr85334.C: New test.
+
2018-04-19 Jonathan Wakely <jwakely@redhat.com>
PR c++/85464 - missing location for -Wignored-qualifiers diagnostic
--- /dev/null
+// { dg-do run { target { i?86-*-linux* i?86-*-gnu* x86_64-*-linux* } } }
+// { dg-require-effective-target cet }
+// { dg-additional-options "-fexceptions -fnon-call-exceptions -fcf-protection -mcet" }
+
+#include <signal.h>
+#include <stdlib.h>
+
+void sighandler (int signo, siginfo_t * si, void * uc)
+{
+ throw (5);
+}
+
+char * dosegv ()
+{
+ * ((volatile int *)0) = 12;
+ return 0;
+}
+
+int main ()
+{
+ struct sigaction sa;
+ int status;
+
+ sa.sa_sigaction = sighandler;
+ sa.sa_flags = SA_SIGINFO;
+
+ status = sigaction (SIGSEGV, & sa, NULL);
+ status = sigaction (SIGBUS, & sa, NULL);
+
+ try {
+ dosegv ();
+ }
+ catch (int x) {
+ return (x != 5);
+ }
+
+ return 1;
+}
+2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR libgcc/85334
+ * unwind-generic.h (_Unwind_Frames_Increment): New.
+ * config/i386/shadow-stack-unwind.h (_Unwind_Frames_Increment):
+ Likewise.
+ * unwind.inc (_Unwind_RaiseException_Phase2): Increment frame
+ count with _Unwind_Frames_Increment.
+ (_Unwind_ForcedUnwind_Phase2): Likewise.
+
2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
PR libgcc/85379
} \
} \
while (0)
+
+/* Increment frame count. Skip signal frames. */
+#undef _Unwind_Frames_Increment
+#define _Unwind_Frames_Increment(context, frames) \
+ if (!_Unwind_IsSignalFrame (context)) frames++
/* Additional actions to unwind number of stack frames. */
#define _Unwind_Frames_Extra(frames)
+/* Increment frame count. */
+#define _Unwind_Frames_Increment(context, frames) frames++
+
#endif /* unwind.h */
gcc_assert (!match_handler);
uw_update_context (context, &fs);
- frames++;
+ _Unwind_Frames_Increment (context, frames);
}
*frames_p = frames;
/* Update cur_context to describe the same frame as fs, and discard
the previous context if necessary. */
uw_advance_context (context, &fs);
- frames++;
+ _Unwind_Frames_Increment (context, frames);
}
*frames_p = frames;