Bug 45788 - Marshaling a native NULL pointer to a managed array creates a new zero sized array
Summary: Marshaling a native NULL pointer to a managed array creates a new zero sized ...
Status: RESOLVED FIXED
Alias: None
Product: Runtime
Classification: Mono
Component: Interop (show other bugs)
Version: 4.6.0 (C8)
Hardware: PC Linux
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2016-10-21 15:44 UTC by Alex Willmy
Modified: 2016-10-21 20:54 UTC (History)
3 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:


Attachments
Simple test program (877 bytes, text/x-csharp)
2016-10-21 15:44 UTC, Alex Willmy
Details
Unmanaged library code for the test program (264 bytes, text/plain)
2016-10-21 15:47 UTC, Alex Willmy
Details


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on GitHub or Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

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.