Bugzilla – Bug 318701
[REGRESSION] PInvoking with CharSet.Auto causes assertion failure in runtime
Last modified: 2007-09-15 21:24:46 UTC
---- Reported by nazgul@omega.pl 2005-08-10 10:20:57 MST ---- Please fill in this template when reporting a bug, unless you know what you are doing. Description of Problem: PInvoking with CharSet.Auto causes assertion failure in runtime (though I'm not an expert of PInvoke and it is possible that Auto is just invalid here) Steps to reproduce the problem: 1. Compile and run following program with mono svn using System; using System.Runtime.InteropServices; class NativeReadLine { [DllImport ("readline", CharSet = CharSet.Auto)] static extern string readline (string x); public string ReadLine (string prompt) { Console.WriteLine ("read line"); return readline (prompt); } } class HacksFramework { public static void Main () { // libreadline is broken on my machine, we need to call something // in libtermcap.so to initialize it properly try { tgetnum (""); } catch { } NativeReadLine rl = new NativeReadLine (); System.Console.WriteLine (rl.ReadLine ("bla")); } // helper call for making system load needed libs [DllImport ("termcap", CharSet = CharSet.Auto)] static extern int tgetnum (string x); } Actual Results: ** ERROR **: file marshal.c: line 1143 (conv_to_icall): should not be reached aborting... Expected Results: bla How often does this happen? With mono svn always. With mono 1.1.8 it works fine. Additional Information: ---- Additional Comments From vargaz@gmail.com 2005-08-10 19:43:37 MST ---- Fixed in SVN. Unknown bug field "cf_op_sys_details" encountered while moving bug <cf_op_sys_details>mono svn</cf_op_sys_details> Unknown operating system unknown. Setting to default OS "Other".