Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
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
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.
Hello, I am currently using Mono on a Xilinx Zynq board. I have been trying to use /dev/mem to increase the speed at which I can toggle GPIO pins. However i have found that there is an error with how the MemoryMappedFile handles Zero byte files. The first was addressed in the current Master solution(error with "capacity"), but there is another when one tries to create a MemroyMapedViewAccessor from a Zero byte file the "size" will always be set to zero because of this logic (line 165 MemoryMapImpl.Map)
if (size == 0 || size > fsize)
size = fsize;
fsize will always be zero resulting in size being set to zero and the Syscall.mmap will fail and return a -1 resulting in the IOException being thrown.
Steps to Reproduce:
1) create MemoryMap of /dev/mem
2) create MemoryMappedViewAccessor
Throws the IOException (line 186) because the mmap fails
Create a MemoryMappedViewAccessor, which should allow for size to be greater than the file size.
Build Date & Platform:
5/1/2014 PetaLinux v2013.10 Yocto 1.4
Additional Builds and Platforms:
if you need anymore information I can provide it. Thanks
Fixed in master.