https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111731
Dimitar Yordanov <dimitar.yordanov at sap dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dimitar.yordanov at sap dot com --- Comment #3 from Dimitar Yordanov <dimitar.yordanov at sap dot com> --- Hi, what I can further add as a detail to the code below is that in the error case "begin" is after "range[0]" as calculated by get_pc_range ----------------- void __register_frame_info_bases (const void *begin, struct object *ob, void *tbase, void *dbase) { ..... // Register the object itself to know the base pointer on deregistration. btree_insert (®istered_frames, (uintptr_type) begin, 1, ob); // Register the frame in the b-tree uintptr_type range[2]; get_pc_range (ob, range); btree_insert (®istered_frames, range[0], range[1] - range[0], ob); ----------------- and pc_begin comes from the following with "((encoding & 0x70) == DW_EH_PE_pcrel" being true ----------------- static const unsigned char * read_encoded_value_with_base (unsigned char encoding, _Unwind_Ptr base, const unsigned char *p, _Unwind_Ptr *val) { .... case DW_EH_PE_sdata8: result = u->s8; p += 8; .... result += ((encoding & 0x70) == DW_EH_PE_pcrel ? (_Unwind_Internal_Ptr) u : base); ----------------- E.g. u->s8 has a value of 0xffffffffffffe6f8 u 0x7fa7fc22f908 and with that result 0x7fa7fc22e000 which is lower as the begin 0x7fa7fc22f160