]> gcc.gnu.org Git - gcc.git/commitdiff
unwind-dw2-fde-darwin.c (examine_objects): Fix aliasing in read_encoded_value_with_ba...
authorNathan Sidwell <nathan@codesourcery.com>
Tue, 14 Jun 2005 08:25:18 +0000 (08:25 +0000)
committerNathan Sidwell <nathan@gcc.gnu.org>
Tue, 14 Jun 2005 08:25:18 +0000 (08:25 +0000)
* unwind-dw2-fde-darwin.c (examine_objects): Fix aliasing in
read_encoded_value_with_base call.
* unwind-dw2-fde-glibc.c (_Unwind_IteratePhdrCallback): Likewise.
* unwind-dw2-fde.c (_Unwind_Find_FDE): Likewise.
* unwind-dw2.c (extract_cie_info): Fix aliasing in
read_encoded_value call.
(execute_cfa_program, uw_frame_state_for): Likewise.

From-SVN: r100927

gcc/ChangeLog
gcc/unwind-dw2-fde-darwin.c
gcc/unwind-dw2-fde-glibc.c
gcc/unwind-dw2-fde.c
gcc/unwind-dw2.c

index 5e2d4deb31d5dbdfc187762575a302afa3df1d03..3bd677781ffb3496ddc5e18ef57d35cb7e875921 100644 (file)
@@ -1,3 +1,13 @@
+2005-06-14  Nathan Sidwell  <nathan@codesourcery.com>
+
+       * unwind-dw2-fde-darwin.c (examine_objects): Fix aliasing in
+       read_encoded_value_with_base call.
+       * unwind-dw2-fde-glibc.c (_Unwind_IteratePhdrCallback): Likewise.
+       * unwind-dw2-fde.c (_Unwind_Find_FDE): Likewise.
+       * unwind-dw2.c (extract_cie_info): Fix aliasing in
+       read_encoded_value call.
+       (execute_cfa_program, uw_frame_state_for): Likewise.
+
 2005-06-13  Roger Sayle  <roger@eyesopen.com>
 
        PR rtl-optimization/22053
index c0db8e1bd4b992155f39ba3e5df7e8f332658bbe..f242654baf9458a37c1c505d7b759822f0511d60 100644 (file)
@@ -220,6 +220,7 @@ examine_objects (void *pc, struct dwarf_eh_bases *bases, int dont_alloc)
            if (result)
              {
                int encoding;
+               _Unwind_Ptr func;
 
                bases->tbase = ob->tbase;
                bases->dbase = ob->dbase;
@@ -229,8 +230,8 @@ examine_objects (void *pc, struct dwarf_eh_bases *bases, int dont_alloc)
                  encoding = get_fde_encoding (result);
                read_encoded_value_with_base (encoding,
                                              base_from_object (encoding, ob),
-                                             result->pc_begin,
-                                             (_Unwind_Ptr *)&bases->func);
+                                             result->pc_begin, &func);
+               bases->func = (void *) func;
                break;
              }
          }
index 306afdda0ac5aa55effbe6012058a1d056d393bb..ebc2d9c37f22716c6754bd8d0d9d4ac039d2657a 100644 (file)
@@ -386,11 +386,13 @@ _Unwind_IteratePhdrCallback (struct dl_phdr_info *info, size_t size, void *ptr)
   data->ret = linear_search_fdes (&ob, (fde *) eh_frame, (void *) data->pc);
   if (data->ret != NULL)
     {
+      _Unwind_Ptr func;
       unsigned int encoding = get_fde_encoding (data->ret);
+      
       read_encoded_value_with_base (encoding,
                                    base_from_cb_data (encoding, data),
-                                   data->ret->pc_begin,
-                                   (_Unwind_Ptr *)&data->func);
+                                   data->ret->pc_begin, &func);
+      data->func = (void *) func;
     }
   return 1;
 }
index df9eafe1f4372c35dd77ab95a2ad40af143148d0..d6b3a5870bc495a3bc46bfc1f60d1b35d0cf80de 100644 (file)
@@ -1013,6 +1013,7 @@ _Unwind_Find_FDE (void *pc, struct dwarf_eh_bases *bases)
   if (f)
     {
       int encoding;
+      _Unwind_Ptr func;
 
       bases->tbase = ob->tbase;
       bases->dbase = ob->dbase;
@@ -1021,7 +1022,8 @@ _Unwind_Find_FDE (void *pc, struct dwarf_eh_bases *bases)
       if (ob->s.b.mixed_encoding)
        encoding = get_fde_encoding (f);
       read_encoded_value_with_base (encoding, base_from_object (encoding, ob),
-                                   f->pc_begin, (_Unwind_Ptr *)&bases->func);
+                                   f->pc_begin, &func);
+      bases->func = (void *) func;
     }
 
   return f;
index b50ae010283dd14af61437fce7360eb6154ee26a..55764fee545049b528ff042a55848b944608583c 100644 (file)
@@ -320,8 +320,10 @@ extract_cie_info (const struct dwarf_cie *cie, struct _Unwind_Context *context,
       /* "P" indicates a personality routine in the CIE augmentation.  */
       else if (aug[0] == 'P')
        {
-         p = read_encoded_value (context, *p, p + 1,
-                                 (_Unwind_Ptr *) &fs->personality);
+         _Unwind_Ptr personality;
+         
+         p = read_encoded_value (context, *p, p + 1, &personality);
+         fs->personality = (_Unwind_Personality_Fn) personality;
          aug += 1;
        }
 
@@ -785,8 +787,13 @@ execute_cfa_program (const unsigned char *insn_ptr,
       else switch (insn)
        {
        case DW_CFA_set_loc:
-         insn_ptr = read_encoded_value (context, fs->fde_encoding,
-                                        insn_ptr, (_Unwind_Ptr *) &fs->pc);
+         {
+           _Unwind_Ptr pc;
+           
+           insn_ptr = read_encoded_value (context, fs->fde_encoding,
+                                          insn_ptr, &pc);
+           fs->pc = (void *) pc;
+         }
          break;
 
        case DW_CFA_advance_loc1:
@@ -1001,8 +1008,12 @@ uw_frame_state_for (struct _Unwind_Context *context, _Unwind_FrameState *fs)
       insn = aug + i;
     }
   if (fs->lsda_encoding != DW_EH_PE_omit)
-    aug = read_encoded_value (context, fs->lsda_encoding, aug,
-                             (_Unwind_Ptr *) &context->lsda);
+    {
+      _Unwind_Ptr lsda;
+      
+      aug = read_encoded_value (context, fs->lsda_encoding, aug, &lsda);
+      context->lsda = (void *) lsda;
+    }
 
   /* Then the insns in the FDE up to our target PC.  */
   if (insn == NULL)
This page took 0.089684 seconds and 5 git commands to generate.