[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Pnet-developers] [patch #3387] Fix for AssemblyBuilder.Save, fix WriteC
From: |
Gopal.V |
Subject: |
[Pnet-developers] [patch #3387] Fix for AssemblyBuilder.Save, fix WriteClassToken to import class from external images |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.6) Gecko/20040206 Firefox/0.8 |
This mail is an automated notification from the patch tracker
of the project: DotGNU Portable.NET.
/**************************************************************************/
[patch #3387] Latest Modifications:
Changes by:
Gopal.V <address@hidden>
'Date:
Fri 09/24/2004 at 11:32 (Asia/Calcutta)
What | Removed | Added
---------------------------------------------------------------------------
Resolution | None | Applied
Status | Open | Closed
------------------ Additional Follow-up Comments ----------------------------
Comitted to CVS on 24th Sept 2004.
Next time, please add your name as well to the patch info for the ChangeLog
entry.
/**************************************************************************/
[patch #3387] Full Item Snapshot:
URL: <http://savannah.gnu.org/patch/?func=detailitem&item_id=3387>
Project: DotGNU Portable.NET
Submitted by: 0
On: Fri 09/24/2004 at 07:02
Category: None
Priority: 7 - High
Resolution: Applied
Privacy: Public
Assigned to: None
Originator Email: address@hidden
Status: Closed
Summary: Fix for AssemblyBuilder.Save, fix WriteClassToken to import class
from external images
Original Submission: Bug Description:
When saving an assembly built using Reflection.Emit,
incorrect tokens for the parameters of methods called, e.g. with callvirt, are
saved.
The tokens being saved, may only be valid in the image that calls
AssemblyBuilder.Save. Classes not in the image being built must be imported.
To Reproduce:
create an assembly/module/type/method with System.Reflection.Emit. In the
method, generate a callvirt
instruction for a method in the executing assembly that takes some class as a
parameter, for example: call (System.Collections.IList args, bool evalargs)
The saved assembly will contain an invalid token for the IList class. If the
token's value is invalid in the assembly, running ildasm on the assembly will
produce something like this:
metadata error in token 0x0A000001: invalid MemberRef type signature
If the token's value is valid, then you will probably see a different class
than IList in the IL output.
Fix:
These invalid tokens are written in image/sig_writer.c:WriteClassToken.
Here, calling ILClassImport creates a new token that is valid in the saved
assembly.
Note: ILClassImport(class) does nothing but return its argument if the class is
already in the image being built.
Follow-up Comments
------------------
-------------------------------------------------------
Date: Fri 09/24/2004 at 11:32 By: Gopal.V <t3rmin4t0r>
Comitted to CVS on 24th Sept 2004.
Next time, please add your name as well to the patch info for the ChangeLog
entry.
File Attachments
-------------------
-------------------------------------------------------
Date: Fri 09/24/2004 at 07:02 Name: sig_writer-importclass.diff Size: 8.21KB
By: None
patch for cvs 2004 9-23 pnet/image/sig_writer.c
http://savannah.gnu.org/patch/download.php?item_id=3387&item_file_id=3698
For detailed info, follow this link:
<http://savannah.gnu.org/patch/?func=detailitem&item_id=3387>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/