unwind-dw2-fde-darwin.c (examine_objects): Fix aliasing in read_encoded_value_with_base call.
* 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
This commit is contained in:
parent
6f7e2c0c96
commit
950ccbc491
5 changed files with 37 additions and 11 deletions
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Add table
Reference in a new issue