bugGNUstep - Bugs: bug #40818, libobjc2 Arm non-legacy dispatch

Group
 
 

bug #40818: libobjc2 Arm non-legacy dispatch

Submitter:  David Hunt <davidhunt>
Submitted:  Thu 05 Dec 2013 06:59:19 PM UTC
   
 
Category:  Libraries Severity:  3 - Normal
Item Group:  Bug Status:  Ready For Test
Privacy:  Public Assigned to:  None
Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

Fri 13 Dec 2013 01:14:45 PM UTC, comment #1: 

Looks like David fixed this. Please give it a try and report back.

Fred Kiefer <FredKiefer>
Group Member
Thu 05 Dec 2013 06:59:19 PM UTC, original submission:  

The Arm version of the non-legacy dispatch trampolines for objc_msgSend in objc_msgSend.arm.S contain 3 critical issues.

Line 49: DTABLE_OFFSET is used instead of DATA_OFFSET
Line 53: DTABLE_OFFSET is used instead of DATA_OFFSET
Around Line 76: slowMsgLookup expects the address of a receiver as it can (and does) modify it. The code here almost does this, however r0 is not loaded with the address of the pushed receiver on the stack. This can be fixed with the simple insertion of,
    mov    r0,sp
after the push {\receiver}


The first two issues send the trampoline off into the scrubs every time. The third issue is a little more subtle as it doesn't crash, it does lead to some very unexpected behaviour though. r0 is pointing at the receiver and when slowMsgLookup overwrites it, it is actually modifying the class pointer on the original object.

David Hunt <davidhunt>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by rmottola (Updated the item)
  • -email is unavailable- added by FredKiefer (Posted a comment)
  • -email is unavailable- added by davidhunt (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2014-10-21 rmottola Open/ClosedIn Test Closed
    2013-12-13 FredKiefer Item GroupNone Bug
        StatusNone Ready For Test
        Open/ClosedOpen In Test

    Back to the top

    Powered by Savane 3.13-bb6a.
    Corresponding source code