[Mono-bugs] [Bug 27782][Cri] New - Marshalling enumeration return values bug.

bugzilla-daemon@rocky.ximian.com bugzilla-daemon@rocky.ximian.com
15 Jul 2002 04:36:38 -0000


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 miguel@ximian.com.

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

--- shadow/27782	Mon Jul 15 00:36:38 2002
+++ shadow/27782.tmp.13819	Mon Jul 15 00:36:38 2002
@@ -0,0 +1,133 @@
+Bug#: 27782
+Product: Mono/Runtime
+Version: unspecified
+OS: other
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Critical
+Component: misc
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: miguel@ximian.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Marshalling enumeration return values bug.
+
+The runtime generates this:
+
+mono$ gdb mono
+GNU gdb Red Hat Linux (5.1.90CVS-5)
+Copyright 2002 Free Software Foundation, Inc.
+GDB is free software, covered by the GNU General Public License, and you are
+welcome to change it and/or distribute copies of it under certain conditions.
+Type "show copying" to see the conditions.
+There is absolutely no warranty for GDB.  Type "show warranty" for details.
+This GDB was configured as "i386-redhat-linux"...
+(gdb) run SqlSharpCli.exe
+Starting program: /mono/bin/mono SqlSharpCli.exe
+[New Thread 1024 (LWP 3625)]
+Welcome to SQL#. The interactive SQL command-line client 
+for Mono.Data.  See http://www.go-mono.com/ for more details.
+
+Type:  \Q to quit
+       \ConnectionString to set the ConnectionString
+       \Provider to set the Provider:
+                 {OleDb,SqlClient,MySql,Odbc,
+                  OracleClient,PostgresClient}
+       \Open to open the connection
+       \Close to close the connection
+       \Execute to execute SQL command(s)/queries(s)
+       \h to show this help.
+       \defaults to show default variables.
+
+
+The default Provider is POSTGRESCLIENT
+
+The default ConnectionString is: 
+    "host=localhost;dbname=test;user=postgres"
+
+
+SQL# \connectionstring host=localhost;dbname=mfoto;user=miguel
+Entered: \connectionstring host=localhost;dbname=mfoto;user=miguel
+
+SQL# \open
+Entered: \open
+Attempt to Open...
+** (process:3625): WARNING **: return type 0x11 unknown
+
+** ERROR **: file marshal.c: line 1448 (mono_marshal_get_native_wrapper):
+should not be reached
+aborting...
+
+Program received signal SIGABRT, Aborted.
+[Switching to Thread 1024 (LWP 3625)]
+0x42029241 in kill () from /lib/i686/libc.so.6
+(gdb) up
+#1  0x400bdc4b in raise () from /lib/i686/libpthread.so.0
+(gdb) 
+#2  0x4202a7d2 in abort () from /lib/i686/libc.so.6
+(gdb) 
+#3  0x400584d4 in g_logv (log_domain=0x0, log_level=G_LOG_LEVEL_ERROR, 
+    format=0x80fcdc0 "file %s: line %d (%s): should not be reached",
+args1=0xbffff08c) at gmessages.c:507
+507
+	      abort ();
+(gdb) 
+#4  0x4005857b in g_log (log_domain=0x0, log_level=G_LOG_LEVEL_ERROR,
+format=0x80fcdc0 "file %s: line %d (%s): should not be reached")
+    at gmessages.c:526
+526
+  g_logv (log_domain, log_level, format, args);
+(gdb) 
+#5  0x080be008 in mono_marshal_get_native_wrapper (method=0x81ee9c8) at
+marshal.c:1448
+1448
+		g_assert_not_reached ();
+(gdb) list
+1443
+	case MONO_TYPE_CHAR:
+1444
+	case MONO_TYPE_TYPEDBYREF:
+1445
+	case MONO_TYPE_FNPTR:
+1446
+	default:
+1447
+		g_warning ("return type 0x%02x unknown", sig->ret->type);	
+1448
+		g_assert_not_reached ();
+1449
+	}
+1450
+
+1451
+	mono_mb_emit_byte (mb, CEE_RET);
+1452
+
+(gdb) p sig->ret
+$1 = (MonoType *) 0x81ec7d8
+(gdb) p *sig->ret
+$2 = {data = {klass = 0x81e9688, type = 0x81e9688, array = 0x81e9688,
+method = 0x81e9688}, attrs = 0, type = 17, num_mods = 0, 
+  byref = 0, pinned = 0, modifiers = 0x81ec7e0}
+(gdb) p sig->ret->type
+$3 = 17
+(gdb) up
+#6  0x0806b02f in arch_create_jit_trampoline (method=0x81ee9c8) at
+trampoline.c:206
+206
+		nm = mono_marshal_get_native_wrapper (method);
+(gdb) p *method
+$4 = {flags = 8342, iflags = 128, klass = 0x81ece48, signature = 0x81ecf58,
+addr = 0x40465fa0, info = 0x0, remoting_tramp = 0x0, 
+  slot = -1, name = 0x4033e0a6 "PQstatus", inline_info = 1, uses_this = 0,
+wrapper_type = MONO_WRAPPER_NONE, string_ctor = 0, 
+  save_lmf = 0, inline_count = -1}
+
+
+The signature for this function is in:
+
+mcs/class/System.Data/System.Data.SqlClient/PostgresLibrary.cs