unwind-sjlj.c (_Unwind_GetIPInfo): Check for context->fc != NULL before looking in...
authorAndrew Haley <aph@redhat.com>
Sun, 15 Jul 2007 17:37:43 +0000 (17:37 +0000)
committerAndrew Haley <aph@gcc.gnu.org>
Sun, 15 Jul 2007 17:37:43 +0000 (17:37 +0000)
2007-07-15  Andrew Haley  <aph@redhat.com>

        * unwind-sjlj.c (_Unwind_GetIPInfo): Check for context->fc !=
NULL before looking in the context.

From-SVN: r126658

gcc/ChangeLog
gcc/unwind-sjlj.c

index 7ca3bbf8607df66504fb79a020e1eb06ddd1cb08..e58f4dffd7d192d6d2352f3de1fed6a7a198055d 100644 (file)
@@ -1,3 +1,8 @@
+2007-07-15  Andrew Haley  <aph@redhat.com>
+
+       * unwind-sjlj.c (_Unwind_GetIPInfo): Check for context->fc != NULL
+       before looking in the context.
+
 2007-07-15  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
 
        PR middle-end/32398
index e1a62c9e02524cc270669e4b054925f763101998..c541bd5f8f9a1a1fd2f84402137858ffba70cfde 100644 (file)
@@ -222,7 +222,10 @@ _Unwind_Ptr
 _Unwind_GetIPInfo (struct _Unwind_Context *context, int *ip_before_insn)
 {
   *ip_before_insn = 0;
-  return context->fc->call_site + 1;
+  if (context->fc != NULL)
+    return context->fc->call_site + 1;
+  else
+    return 0;
 }
 
 /* Set the return landing pad index in CONTEXT.  */