[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Pnet-developers] [bugs #11212] Marshalling bug - code pointer in struct
From: |
Ilyak |
Subject: |
[Pnet-developers] [bugs #11212] Marshalling bug - code pointer in struct marshalled to unmanaged becomes invalid |
User-agent: |
Mozilla/5.0 (compatible; Konqueror/3.2; Linux; X11) (KHTML, like Gecko) |
This mail is an automated notification from the bugs tracker
of the project: DotGNU Portable.NET.
/**************************************************************************/
[bugs #11212] Latest Modifications:
Changes by:
Ilyak <address@hidden>
'Date:
Sun 12/12/2004 at 09:47 (GMT)
------------------ Additional Follow-up Comments ----------------------------
(gdb) run call.exe
Starting program: /usr/local/bin/ilrun call.exe
[Thread debugging using libthread_db enabled]
[New Thread 1073879904 (LWP 1429)]
First time
Proceed to emitter
Proceed to callback
Second time
Proceed to emitter
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1073879904 (LWP 1429)]
0x0000ffe9 in ?? ()
(gdb) bt
#0 0x0000ffe9 in ?? ()
#1 0x405fb675 in EmitCallback () from /home/ilyak/bug/libcall.so
#2 0x080d78d3 in ffi_call_SYSV () at src/x86/sysv.S:59
#3 0x080d7899 in ffi_raw_call (cif=0x0, fn=0x405fb658 <EmitCallback>,
rvalue=0x13, fake_avalue=0xffe9) at src/x86/ffi.c:515
#4 0x08094b8e in _ILCVMInterpreter (thread=0x8157e70) at cvm_call.c:889
#5 0x0804c3d8 in _ILCallMethod (thread=0x8157e70, method=0x40296578,
unpack=0x804c25c <_ILCallUnpackVResult>, result=0xbffff710, isCtor=0,
_this=0x0, pack=0x804bfa4 <_ILCallPackVParams>, userData=0xbffff720)
at call.c:706
#6 0x0804c6ad in ILExecThreadCallV (thread=0x8157e70, method=0x40296578,
result=0xbffff710, args=0xbffff720) at call.c:928
#7 0x0804bb6c in main (argc=2, argv=0xbffff7d4) at ilrun.c:494
Not quite a NULL, while sure this is not a real pointer :)
/**************************************************************************/
[bugs #11212] Full Item Snapshot:
URL: <http://savannah.gnu.org/bugs/?func=detailitem&item_id=11212>
Project: DotGNU Portable.NET
Submitted by: Ilyak
On: Sat 12/04/2004 at 08:04
Category: None
Severity: 5 - Average
Item Group: None
Resolution: None
Privacy: Public
Assigned to: None
Status: Open
Summary: Marshalling bug - code pointer in struct marshalled to unmanaged
becomes invalid
Original Submission: There is an example that shows problem: If i have a
struct with Delegate in it, and i pass ref ThisStruct to unmanaged method
twice, on second pass Delegate becomes invalid and ilrun crashes.
Mono crashes even on first pass there :))
Follow-up Comments
------------------
-------------------------------------------------------
Date: Sun 12/12/2004 at 09:47 By: Ilyak <Ilyak>
(gdb) run call.exe
Starting program: /usr/local/bin/ilrun call.exe
[Thread debugging using libthread_db enabled]
[New Thread 1073879904 (LWP 1429)]
First time
Proceed to emitter
Proceed to callback
Second time
Proceed to emitter
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1073879904 (LWP 1429)]
0x0000ffe9 in ?? ()
(gdb) bt
#0 0x0000ffe9 in ?? ()
#1 0x405fb675 in EmitCallback () from /home/ilyak/bug/libcall.so
#2 0x080d78d3 in ffi_call_SYSV () at src/x86/sysv.S:59
#3 0x080d7899 in ffi_raw_call (cif=0x0, fn=0x405fb658 <EmitCallback>,
rvalue=0x13, fake_avalue=0xffe9) at src/x86/ffi.c:515
#4 0x08094b8e in _ILCVMInterpreter (thread=0x8157e70) at cvm_call.c:889
#5 0x0804c3d8 in _ILCallMethod (thread=0x8157e70, method=0x40296578,
unpack=0x804c25c <_ILCallUnpackVResult>, result=0xbffff710, isCtor=0,
_this=0x0, pack=0x804bfa4 <_ILCallPackVParams>, userData=0xbffff720)
at call.c:706
#6 0x0804c6ad in ILExecThreadCallV (thread=0x8157e70, method=0x40296578,
result=0xbffff710, args=0xbffff720) at call.c:928
#7 0x0804bb6c in main (argc=2, argv=0xbffff7d4) at ilrun.c:494
Not quite a NULL, while sure this is not a real pointer :)
-------------------------------------------------------
Date: Sun 12/12/2004 at 09:16 By: Ilyak <Ilyak>
I remember that when i traced this bug with gdb, i end up rith segfault when
trying to execute code at something like 0x00000006.
And, anyway, if i'm getting a NULL for the delegate, why don't i get
NullPointerException? (I get hang instead)
And I beleive this behavior is invalid anyway, both calls should succeed,
should not them?
-------------------------------------------------------
Date: Sat 12/11/2004 at 14:45 By: Gopal.V <t3rmin4t0r>
I added WriteLines for cbi.callback in the code and this is what it threw up.
First time
call+CallbackDelegate
Proceed to emitter
Proceed to callback
Second time
Uncaught exception: System.NullReferenceException: The value 'null' was found
where an instance of an object was required
So you're getting a C# null for the delegate there.
File Attachments
-------------------
-------------------------------------------------------
Date: Sat 12/04/2004 at 08:04 Name: bug.tar.gz Size: 684B By: Ilyak
Tiny bug example. Run build.sh to make.
http://savannah.gnu.org/bugs/download.php?item_id=11212&item_file_id=1942
For detailed info, follow this link:
<http://savannah.gnu.org/bugs/?func=detailitem&item_id=11212>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/