Bug 45788

Summary: Marshaling a native NULL pointer to a managed array creates a new zero sized array
Product: [Mono] Runtime Reporter: Alex Willmy <willmyalex>
Component: InteropAssignee: Bugzilla <bugzilla>
Status: RESOLVED FIXED    
Severity: normal CC: mono-bugs+mono, mono-bugs+runtime, vargaz
Priority: ---    
Version: 4.6.0 (C8)   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Tags: Is this bug a regression?: ---
Last known good build:
Attachments: Simple test program
Unmanaged library code for the test program

Description Alex Willmy 2016-10-21 15:44:31 UTC
Created attachment 18161 [details]
Simple test program

When marshaling a native NULL pointer to a managed array the interop marshaler creates a new array with size 0 instead of passing null.
Comment 1 Alex Willmy 2016-10-21 15:47:59 UTC
Created attachment 18162 [details]
Unmanaged library code for the test program
Comment 2 Zoltan Varga 2016-10-21 20:54:01 UTC
Fixed in mono master 27d0ef18f062c4b50001b8a02ea4dc876e233555.