[Mono-bugs] [Bug 82387][Wis] New - P/Invoke partially not working on Mac OS X

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Thu Aug 9 12:20:40 EDT 2007


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by wjohansson at atacomm.com.

http://bugzilla.ximian.com/show_bug.cgi?id=82387

--- shadow/82387	2007-08-09 12:20:39.000000000 -0400
+++ shadow/82387.tmp.22302	2007-08-09 12:20:39.000000000 -0400
@@ -0,0 +1,86 @@
+Bug#: 82387
+Product: Mono: Runtime
+Version: 1.2
+OS: other
+OS Details: Mac OS X 10.4.10, Intel
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Wishlist
+Component: JIT
+AssignedTo: grompf at sublimeintervention.com                            
+ReportedBy: wjohansson at atacomm.com               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: P/Invoke partially not working on Mac OS X
+
+Description of Problem:
+
+Appears to crash with an illegal instruction on an Intel Mac with Mac OS X 10.4.10 with Mono 
+1.2.5 and head when calling a Carbon function from P/Invoke. Doesn't occur with a simple test 
+case with a simple C functioon that simply prints hello.
+
+Steps to reproduce the problem:
+1. Compile test case.
+2. Run it with 1.2.5 or head.
+
+Actual Results:
+
+Unhandled Exception: System.ExecutionEngineException: SIGILL
+  at <0x00000> <unknown method>
+  at Hello.Main (System.String[] args) [0x00000] 
+
+gdb (t a a bt):
+
+Program received signal EXC_BAD_INSTRUCTION, Illegal instruction/operand.
+0x8fe12f94 in __dyld_stub_binding_helper_interface ()
+(gdb) t a a bt
+
+Thread 4 (process 21734 thread 0x2903):
+#0  0x900248c7 in semaphore_wait_signal_trap ()
+#1  0x900288b4 in pthread_cond_wait ()
+#2  0x000f2a31 in timedwait_signal_poll_cond (cond=0x160b1e8, mutex=0x160b1bc, 
+timeout=0x0, alertable=0) at handles.c:1443
+#3  0x000f2d79 in _wapi_handle_timedwait_signal_handle (handle=0x2804, timeout=0x0, 
+alertable=0) at handles.c:1523
+#4  0x000f2b56 in _wapi_handle_wait_signal_handle (handle=0x2804, alertable=0) at handles.c:
+1483
+#5  0x00103438 in WaitForSingleObjectEx (handle=0x2804, timeout=4294967295, alertable=0) 
+at wait.c:200
+#6  0x000835a5 in finalizer_thread (unused=0x0) at gc.c:835
+#7  0x000e8620 in start_wrapper (data=0x1207c90) at threads.c:513
+#8  0x0010180f in thread_start_routine (args=0x1641768) at threads.c:264
+#9  0x00118407 in GC_start_routine (arg=0x110af60) at pthread_support.c:1362
+#10 0x90024227 in _pthread_body ()
+
+Thread 3 (process 21734 thread 0x2603):
+#0  0x90037b57 in mach_wait_until ()
+#1  0x9003799e in nanosleep ()
+#2  0x000ed4e6 in collection_thread (unused=0x0) at collection.c:34
+#3  0x90024227 in _pthread_body ()
+
+Thread 2 (process 21734 thread 0xf03):
+#0  0x90009cd7 in mach_msg_trap ()
+#1  0x90009c38 in mach_msg ()
+#2  0x00148570 in mach_exception_thread (arg=0x0) at mini.c:11305
+#3  0x00118407 in GC_start_routine (arg=0x110af60) at pthread_support.c:1362
+#4  0x90024227 in _pthread_body ()
+
+Thread 1 (process 21734 local thread 0xf03):
+#0  0x8fe12f94 in __dyld_stub_binding_helper_interface ()
+#1  0x00000000 in ?? ()
+(gdb) 
+
+Expected Results:
+
+No SIGILL, function should return an IntPtr.
+
+How often does this happen? 
+
+Every time. Confirmed on a clean Intel Mac.
+
+Additional information:
+
+I think this may be specific to Intel Mac. Have no PowerPC to test with.


More information about the mono-bugs mailing list