dotgnu-pnet
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Pnet-developers] [bugs #9542] GCHandle.AddrOfPinnedObject gives incorre


From: Marcus Urban
Subject: [Pnet-developers] [bugs #9542] GCHandle.AddrOfPinnedObject gives incorrect address for arrays
User-agent: Mozilla/5.0 (compatible; Konqueror/3.2; Linux 2.4.21-144-athlon; X11; i686; en_US, en) (KHTML, like Gecko)

This mail is an automated notification from the bugs tracker
 of the project: DotGNU Portable.NET.




/**************************************************************************/
[bugs #9542] Full Item Snapshot:

URL: <http://savannah.gnu.org/bugs/?func=detailitem&item_id=9542>
Project: DotGNU Portable.NET
Submitted by: Marcus Urban
On: Sat 07/03/2004 at 21:49

Category:  None
Severity:  5 - Average
Item Group:  None
Resolution:  None
Assigned to:  None
Status:  Open


Summary:  GCHandle.AddrOfPinnedObject gives incorrect address for arrays

Original Submission:  When a GCHandle with GCHandleType.Pinned is created, it 
should be possible to obtain the address of the object with 
GCHandle.AddrOfPinnedObject(). When the object in question is an array, Pnet 
appears to return a pointer to some header information that preceeds the actual 
appear data. However, Rotor returns a pointer to the first element of the 
array. Note in the output samples below that element 1 is incorrect and that 
the array indexes are offset.

To compile the test cases, use

1. gcc -shared -o libtest.so test.c 
2. cscc -o test.exe test.cs 
3. ilrun test.exe 

Output from ilrun:

136372232 136372232
size of array[x]: 1
==> array(1) = 48
==> array(1986) = 1
==> array(1987) = 2

Output from Rotor:

1093363496 1093363496 
size of array[x]: 1 
==> array(1982) = 1 
==> array(1983) = 2







File Attachments
-------------------

-------------------------------------------------------
Date: Sat 07/03/2004 at 21:49  Name: test.c  Size: 345B   By: mathpup
Test case (C component)
http://savannah.gnu.org/bugs/download.php?item_id=9542&amp;item_file_id=1456






For detailed info, follow this link:
<http://savannah.gnu.org/bugs/?func=detailitem&item_id=9542>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]