bugGNUstep - Bugs: bug #35327, "Changed type signature"...

Group
 
 

bug #35327: "Changed type signature" debug output

Submitter:  Fred Kiefer <FredKiefer>
Submitted:  Thu 19 Jan 2012 09:16:18 AM UTC
   
 
Category:  Base/Foundation Severity:  2 - Minor
Item Group:  Bug Status:  Fixed
Privacy:  Public Assigned to:  None
Open/Closed:  In Test
* Mandatory Fields

Add a New Comment Rich Markup
   

Thu 19 Jan 2012 10:27:50 AM UTC, comment #1: 

This should be fixed (at least in part).

There are really two issues here:
1. incorrect test generating debug warning when it shouldn't have (since the two types signatures are equivalent/matching).
2. incorrect offset generated in NSMethodSignature

I've changed the code to correct the first.
The second (calculating offsets at all) is a non-standard feature that we no longer (AFAIK) use ... so we should probably just remove it at some point.

Richard Frith-Macdonald <CaS>
Group Member
Thu 19 Jan 2012 09:16:18 AM UTC, original submission:  

When starting up Ink with debug output enabled (openapp Ink/Ink --GNU-Debug=dflt) I get the following message a lot:

File GSFFIInvocation.m: 604. In GSFFIInvocationCallback Changed type signature 'Vv52@0:8@16@24@32C40@44' to 'Vv56@0:8@16@24@32C40@48' for 'postNotificationName:object:userInfo:deliverImmediately:for:'


Wolfgang Lux analysed the issue and came up with this explanation:

>I think the problem is in NSMethodSignature, which seems to reconstruct the Objective-C types.
>Try this on your machine:


>  printf("%s\n", [[NSMethodSignature signatureWithObjCTypes: "Vv52@0:8@16@24@32C40@44"] methodType]);


>It should print Vv56@0:8@16@24@32C40@48. So it looks like NSMethodTypeSignature is enforcing stricter alignment constraints than the compiler.



And that was the output I got whit gcc 4.6 on OpenSuse 12.1.
Now I don't know whether gcc is wrong here or base, but it would be great to get them to agree on the signature of the method. As I understand it a disagreement here may easily lead to stack corruption.

Fred Kiefer <FredKiefer>
Group Member

 

(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 CaS (Posted a comment)
  • -email is unavailable- added by FredKiefer (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 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2012-01-19 CaS StatusNone Fixed
        Open/ClosedOpen In Test

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code