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

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #35327: "Changed type signature" debug output

Submitted by:  Fred Kiefer <FredKiefer>
Submitted on:  Thu 19 Jan 2012 09:16:18 AM UTC  
 
Category: Base/FoundationSeverity: 2 - Minor
Item Group: BugStatus: Fixed
Privacy: PublicAssigned to: None
Open/Closed: In Test

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>
Project 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>
Project Member

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by CaS (Posted a comment)
  • -unavailable- added by FredKiefer (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 19 Jan 2012 10:27:50 AM UTCCaSStatusNone=>Fixed
      Open/ClosedOpen=>In Test

    Back to the top


    Powered by Savane 3.1-cleanup1