Hi,

as I found out, the EHT entries generated for Objective-C code claim that the TTypeEncoding is DW_EH_PE_absptr, but in fact the encoding of the pointers in the type table is DW_EH_PE_pcrel | DW_EH_PE_indirect.

I don't know if this is an ARM-specific treatment that the personality routine must be able to cope with or if this has to be fixed in the generated EHT. I leave this up to the experts. In case it will be decided that we have to fix that in the runtime, I attached a possible patch.

Best regards,
Mathias

Am 14.03.14 16:58, schrieb Mathias Bauer:

Now the test case works - at least when run inside gdb. I still have to
find out why it core dumps without gdb.

And this turns out to be a problem of interpreting the LSDA.

The stack frame in question belongs to [NSOperation start].
When the PR __gnu_objc_personality_v0 is called for it, the
internal_objc_personality function calls check_action. The
resolve_indirect_value function returns something that - when
interpreted as a char* - leads to a crash.

I wonder whether the internal_objc_personality needs some adjustments
for _US_FORCE_UNWIND here.

I will continue investigating this, but I would appreciate any hints
that could help me speed this up. My wife probably will get angry if it
takes the whole weekend. ;-)

Regards,
Mathias

_______________________________________________
Discuss-gnustep mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/discuss-gnustep
Index: dwarf_eh.h
===================================================================
--- dwarf_eh.h  (revision 37628)
+++ dwarf_eh.h  (working copy)
@@ -177,6 +177,11 @@
 
 static uint64_t resolve_indirect_value(struct _Unwind_Context *c, unsigned 
char encoding, int64_t v, dw_eh_ptr_t start)
 {
+#ifdef __arm__
+       if (get_base(encoding) == DW_EH_PE_absptr)
+           encoding = DW_EH_PE_pcrel | DW_EH_PE_indirect;
+#endif
+
        switch (get_base(encoding))
        {
                case DW_EH_PE_pcrel:
_______________________________________________
Discuss-gnustep mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/discuss-gnustep

Reply via email to