[Mono-bugs] [Bug 635268] New: Passing a casted value to a byRef paramter of a dll importet function yields invalid IL

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Fri Aug 27 18:17:39 EDT 2010


https://bugzilla.novell.com/show_bug.cgi?id=635268

https://bugzilla.novell.com/show_bug.cgi?id=635268#c0


           Summary: Passing a casted value to a byRef paramter of a dll
                    importet function yields invalid IL
    Classification: Mono
           Product: Mono: Compilers
           Version: 2.6.x
          Platform: i686
        OS/Version: openSUSE 11.3
            Status: NEW
          Severity: Minor
          Priority: P5 - None
         Component: Basic
        AssignedTo: rkvinge at novell.com
        ReportedBy: simar at gmx.net
         QAContact: mono-bugs at lists.ximian.com
          Found By: Development
           Blocker: ---


Created an attachment (id=386020)
 --> (http://bugzilla.novell.com/attachment.cgi?id=386020)
Example. The dll mentioned is irrelevant. The commented code lines make things
work.

Description of Problem:
Passing something like CType(Array.Length, UInt16) as a byRef parameter to an
external function imported from a library leads to invalid IL. This is contrary
to the .NET behavior where this works even if that means the possibly returned
value is ignored.

Steps to reproduce the problem:
1. Compile the example.
2. Try to run it.


Actual Results:
Unhandled Exception: System.InvalidProgramException: Invalid IL code in
import_func_ref.Application:Main (): IL_0003: call      0x06000002

Expected Results:
"bla.dll" or dll not found exception.

How often does this happen? 
Always

-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the mono-bugs mailing list