Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2019-07-31[zlib] Fix typo in readme and remove deleted file from msvc projectsAlexander Köplinger
2019-07-31Update zlib from 1.2.5 to 1.2.11. (#15480)Jay Krell
Circa 2010 to circa 2017. Retrieved with apt-get source zlib on WSL Ubuntu 18.04.2 LTS. This matches Debian or Ubuntu (they differ by one commit, and one of them restores a dummy function for compat). --- * [minizip] Ensure we don't ever accidentally change calling convention Make sure we always #define ZCALLBACK to empty so we don't change the calling convention on windows by including a header which defines 'CALLBACK'. This will keep things as cdecl as required by the c# pinvokes. * Update zlib readme. * Update zlib from 1.2.5 to 1.2.11. * [zlib] Small fix for Visual C++. see https://github.com/madler/zlib/pull/435/files#diff-0558e84b0c24a83ca790dcb05cd26212R1087 and https://github.com/madler/zlib/pull/435/files#diff-0558e84b0c24a83ca790dcb05cd26212R1104 * Add gzguts.h to Makefiles. * Add .h files to Visual Studio project files just for GUI purposes.
2019-07-31Add O_NOATIME to OpenFlags (#8993)turbo
O_NOATIME (Linux > 2.6.8): Do not update the file last access time (st_atime in the inode) when the file is read(2). Programs that merely index the existence of a file (backup programs e.g.) can reduce disk load using this flag.
2019-07-17configure/makefile To support updating zlib to 1.2.11. (#15697)Jay Krell
2019-07-06Cleanup zlib-helper.c allocations -- move integer overflow checks into ↵Jay Krell
calloc. (#15505)
2019-06-26CreateNLSocket and CloseNLSocket should return gpointer (#15408)Ryan Lucia
In managed, these functions are used as `static external IntPtr`. This means that previously on arm64 the top bits of the return value were garbage. A comparison with 64-bit -1 like in LinuxNetworkChange.EnsureSocket would never be true, which was causing us to hit other assertions in the runtime. Co-authored-by: Aleksey Kliger <alklig@microsoft.com>
2019-04-03Rename cabs/cimag/creal to mono_cabs/mono_cimag/mono_creal without macro to ↵Jay Krell
rename. (#13663) Also make cimag/creal macros for guaranteed inlining -- instead of passing structs by value. And add spaces before parens to follow coding convention (which is designed to ease low tech searches for entire words). This was agreed to when the code was first ported to C++ but got dropped. The compromise though was to put the defines relatively late to limit their impact.
2019-03-31[sdks,mac] Remove dependency on MXE in favor of MinGWMarek Habersack
It turns out that homebrew now has a package for the MinGW gcc-based windows cross compiler which is awesome as it allows us to skip building MXE and use the latest version of the GCC suite pre-packaged for Mac. This commit removes almost all traces of MXE (except for `mxe.mk` itself, because I don't know if any bot or external tool, whatever, use targets in it) and adds the following brew packages to SDK bot provisioning as well as to the `provision-mxe` target of Mono SDKs: * mingw-w64 * xamarin/xamarin-android-windeps/mingw-zlib The latter package builds a Windows version of zlib using MinGW and it comes from Xamarin's own homebrew tap at https://github.com/xamarin/homebrew-xamarin-android-windeps/blob/f4cc90845ff1953800d8d71035566a12d9b7aa24/mingw-zlib.rb Additionally, this commit adds a new `configure` flag: `--with-static-zlib=PATH` which allows one to specify the static zlib archive to use when linking Mono. The static archive supersedes the otherwise indicated or detected zlib. This is the recommended mode of operation for MinGW builds as it avoids problems with `zlib.dll` versions on the target machine.
2019-01-21[tvOS] cleanup defines for tvOS (#12539)Bernhard Urban
Fixes https://github.com/mono/mono/issues/11697
2019-01-17[System.IO.Compression]: Correctly handle exceptions in inner stream. #12205.Martin Baulig
DeflateStream now correctly handles exceptions thrown by it's inner stream and rethrows them after returning from native code.
2018-11-13[ci] Add targets to bundle tests and add a script to run them in HelixAlexander Köplinger
The test-bundle target copies all assets needed for test execution to a specified directory. We upload this directory to Helix and use it to run our mainline tests.
2018-09-11Merge pull request #10428 from jaykrell/mono_pages_not_faultedmonojenkins
Remove unused mono_pages_not_faulted, autoconf for mlock instead of mincore.
2018-09-06Fix DeflateStream handling of zero-length reads from underlying stream.Filip Navara
2018-09-03Use AC_CHECK_FUNCS(mincore mlock munlock).Jay Krell
2018-09-02Replace check for mincore with check for mlock.Jay Krell
2018-08-31Merge pull request #10240 from frebib/fix-strerror_rmonojenkins
[runtime] Use AC_FUNC_STRERROR_R() in Mono.Posix Hopefully this is less of a disaster than #9691 Inspired by https://github.com/mono/mono/commit/3b3b48dbb4cdbda44ffa2f10e74f819acb78bd96 Fixes https://github.com/mono/mono/issues/9532 Signed-off-by: Joe Groocock <me@frebib.net> <!-- Thank you for your Pull Request! If you are new to contributing to Mono, please try to do your best at conforming to our coding guidelines http://www.mono-project.com/community/contributing/coding-guidelines/ but don't worry if you get something wrong. One of the project members will help you to get things landed. Does your pull request fix any of the existing issues? Please use the following format: Fixes #issue-number -->
2018-08-27[runtime] Use AC_FUNC_STRERROR_R() in Mono.PosixJoe Groocock
Inspired by https://github.com/mono/mono/commit/3b3b48dbb4cdbda44ffa2f10e74f819acb78bd96 Fixes https://github.com/mono/mono/issues/9532 Signed-off-by: Joe Groocock <me@frebib.net>
2018-08-09[cxx] Port complex math to small portable C and C++. (#9821)Jay Krell
* [cxx] Port complex math to small portable C and C++ with the only dependency being hypot and non-complex math, and small preexisting code we already had for msvc. I.e. we already had two versions, with varying portability. Use one of them, adding about three lines to it. There was some debate back and forth about macros/renames here. This version significantly reduces line damage and is much easier to read. Doing the rename as a separate step may still be advisable, to erase any doubt as to portable semantics, i.e. namespace isolation. Mono style divergence is also left unfixed to avoid further line damage. i.e. consider `double_complex` => `MonoComplex`. `mono_double_complex_` => `mono_complex_`.
2018-05-24Prune unused incorrect looking zip code. (#8752)Jay Krell
Not sure what is happening here. Is the type incorrect throughout, or being passed to wrong function?
2018-04-13[runtime] Get rid of the GLIB_LIBS autoconf define, it prevents automake ↵Zoltan Varga
from detecting the dependency on libeglib.la. (#8184) * [runtime] Get rid of the GLIB_LIBS autoconf define, it prevents automake from detecting the dependency on libeglib.la. Fixes #8175. * [runtime] Link eglib against -lm to avoid duplication. * [runtime] Remove a few extra -lm options. * [runtime] More GLIB_LIBS fixes.
2018-03-29add some OpenBSD patches (#7699)thfrwn
add some OpenBSD patches Hi, A few trivial additions of OpenBSD to ifdefs, plus the change of the abort signal to SIGUSR1 which fixes the SIGABRT problem (other compilation problems remain). SIGTTIN is broadcast to the process group which leads to the SIGABRT (at least on OpenBSD).
2018-03-29check for iconv only once (#7873)Ludovic Henry
It is enough to check for iconv dependencies once in the eglib/configure - just use the generated libtool library file to automatically add additional dependencies (if any). While here, make sue libeglib.a has libraries returned by LTLIBTOOL as a libtool dependency.
2018-03-16[sdks] Fix concurrent building of MonoAotOffsetsDumper.exe + Simplify ↵Ludovic Henry
building of support library (#7652) * [sdks] Simply building of support library * [sdks] Fix concurrent building of MonoAotOffsetsDumper.exe * [sdks] Cleanup of some targets
2018-02-15Remove GetNLSocket which is unused and produces a warning because it is ↵jaykrell
unprototyped. (#6691)
2018-02-06[Mono.Posix] Fix the Android xattr check to not disable it on all other ↵Rodrigo Kumpera
platforms.
2018-02-05Support IBM AIX on POWER (#6677)Calvin
* Get autotools scripts for Mono and Boehm to recognize i PASE is most similar to AIX, and perhaps I assume other commercial Unices, as well as PowerPC Linux, so grab variables from them as needed. With this, we get glib failing to build due to missing mkdtemp. * Use better cpp definition to grab more of what we want * Fix random and 64-bit file offset support * Set TARGET on IBM i on POWER * Add hack to gfile-unix.c to work around flawed AIX header From comment: /* HACK: the preprocessor will not give us mkdtemp no matter what and Mono (for good reason) does "-Werror-implicit-function-declaration" so we error out; instead declare mkdtemp here; the linker will find mkdtemp anwyays. libuv has had similar issues, but they just ignore the compiler warning instead of failing on it. See: github.com/libuv/libuv/pull/740 */ * Work around missing definition on AIX/PASE * Fix conflicting definition from due too AIX headers * Initial work to get JIT working on AIX * uncertain about NIP; is IAR the right register? need review from PPC asm people * needs calling convention work; AIX does NOT use ELF * Fix lack of casting on sigcontext macros, fix errnos for AIX * AIX doesn't distinguish between ENOTEMPTY and EEXIST without a define. Handle this case with a conditional cpp directive.. * When ctx is a void pointer, dereferencing as a struct will fail. Handle this case with a cast. * Handle regular AIX as well as PASE * Implement stack boundaries check for AIX, volume info func * vol info should be like other Unix, just needs to bridge ifdef * highly uncertain for the bounds checking, needs further review * Fix typo in mono/utils/mono-threads-aix.c * In boehm-gc.c, don't use pthread_getattr_np on AIX even if available It's not available on IBM i, and even if available, toolchains for AIX may "helpfully" swap out system headers with variants that remove functions like pthread_getattr_np. * Don't use "-export-dynamic" on non-GNU ld IBM ld considers "-e" to be a flag for setting the entry point. Detect non-GNU ld, and offer equivalents when possible. The makefile in mini had to be changed as a result due to hardcoded flags. * Use pthread-stop-world.c on AIX Remove an ifdef that gated this off to AIX. It seems the old AIX specific files shouldn't be used, and that the changelog for libgc says pthread should work fine on AIX instead; yet it was blocked. Restore this, as it compiles and seems to let mono-boehm link fine. * AIX workarounds for some of support dir * fstab on AIX is there, but defines a struct more like other platforms' checklist struct. * AIX, like macOS and some BSDs, doesn't define some serial types. * psignal is another victim of GNU; even then it isn't in PASE headers anyways * More support workarounds for AIX headers * Replacement function body for syslog2 on vsyslog-less platforms AIX lacks vsyslog; detect in autoconf and act appropriately. * Final support hacks for AIX * Fix problematic stack management on AIX this gets us past ifdefs, after much handwringing * get the right end of the stack; r1/stack pointer is on the wrong end and ustk is just plain broken * AIX doesn't seem to like the semantics of the mmap call valloc does here; either we're allocating into an area we shouldn't be or we're not passing the right flags. Until then, learn to live without the stack guard? * Disable Boehm GC on AIX Focus on getting SGen working, and avoid legacy debugging nonsense * Remove AIX ifdef-undef and replace with s/hz/uhz * Don't use sigaltstack on AIX due to bugginess with guard sections The valloc call on AIX has issues after issuing mprotect; don't do do it. I believe it fails because we aren't issuing the right flags on AIX, or because we're allocating inside of an already allocated area. * Perform a 64-bit build on AIX We still crash at the same place, but probably for the best that we switch to 64-bit. (Maybe we could make it configurable?) * Fix func descriptor ifdef, add initial (likely wrong) defs for AIX * AIX doesn't define __powerpc64__ or __ppc64__ when compiling as 64-bit. Use an alternate ifdef, and shuffle around that ifdef anyways, as it could lead to wrong results on other platforms too. * AIX likely needs special definitions, especially on 32-bit. The calling convention is closest to PPC64BE Linux, but not exactly. * Fix stack size on AIX Ruby dealt with this before: https://github.com/ruby/ruby/commit/a2594be783c727c6034308f5294333752c3845bb * Set up initial PPC hwcap for AIX, fix ftnptr ifdefs, tweak AIX defs * Fix hwcap to use better values on PPC AIX Still needs more adjustment though * Fix alignment issue on AIX, tweak mini-ppc values just a bit more * On AIX, doubles are always aligned by 4 if they're in structs. Since we need to have them aligned by 8 on 64-bit, this is bad, so change the type on AIX. * We can use this definition on AIX Now we can bootstrap Mono! * Shuffle MonoArray ifdef per suggestion of @vargaz * Fix System.Decimal division on big endian systems Before, we got non-sensical overflow on things like `(Decimal)Int32.MaxValue / 1000`; now they get the same value, comparing this POWER6 running AIX to my server's output running OpenBSD/amd64. * Fix dynamically linked build of Mono on AIX nm wasn't seeing 64-bit symbools as it defaults to 32-bit mode, also never try to use GNU nm * Fix PPC64 define in mono-config Interestingly, there was an AIX define already present, and that definition is present in AIX's passed includes, so continue to use it. * Don't use __thread even if detected on AIX tl;dr: The assembler gets angry with __thread and minimal-toc, and changing options to replace minimal-toc causes linker issues; this TLS option isn't important anyways if we have pthread instead, like before when we were using Perzl's old GCC without __thread. * Get lib.a(lib.o) type archives working with P/Invoke for AIX AIX libraries are very, very strange compared to other Unices. I'm not entirely sure if this is correct or optimal; it may need to special case further. For now, it's enough to get gacutil up and running. Some resources I found useful for this charade: <http://stromberg.dnsalias.org/~dstromberg/AIX-shared-libs.html> Also set libc and libintl to their proper values. * Scheduling priority hack for i PASE doesn't accept anything other than SCHED_OTHER, and the funcs for getting min/max don't work either. AIX suffers, but only a little bit. * Final polish on request Remove Boehm changes if we don't use Boehm, tweak some defines, remove some externs, tweak autoconf file * Be aware of ERESTART, on OSes that use it Instead of EINTR/EAGAIN, AIX uses ERESTART. Handle this, so things like xsp are less chatty when performing async IO.
2018-01-04Adds support for nanosecond resolution file information where available ↵Miguel de Icaza
(Fixes: 6283) (#6307) * Adds support for nanosecond resolution file information where available. This patch adds support to the runtime to use the nanosecond information available on Mac and Linux on `struct stat`. `stat.st_Xtimespec` strucutre on OSX, and `stat.st_Xtime` and `stat.st_Xtim.tv_nsec` pair on Linux. Additionally, this adds support in `Mono.Posix` for MacOS nanosecond stat data, it already had Linux support before. * Use ULL here to prevent the computation from overflowing
2017-12-06Compile on amd64 Haiku (#4473)Calvin
* Compile on amd64 Haiku Use sigcontext (somewhat like win32, or x86) on Haiku amd64. On amd64, Haiku doesn't have issues with marshalling 64-bit values, but it currently does have issues with SGen either causing a stall or a core dump. As such, while it can compile the stdlib (further than x86 got), it's still a work in progress. * Use set_real_time_clock for sys-time.c on Haiku * Get mono-boehm compiling on Haiku again It still doesn't work. Initialization will call GC_mark_from, which will cause a segmentation fault as it decrements pointers. (Mono will enter an infinite loop in mono_get_hazardous_pointer as a result.) For now, mono-sgen will continue to be used by default.
2017-11-10Include <config.h> in C files that include mono headersAleksey Kliger
Any translation unit that includes a Mono header should include <config.h> first to ensure that all of our configuration defines are available. In particular, config.h defines MONO_INSIDE_RUNTIME which, in mono-publib.h causes MONO_RT_EXTERNAL_ONLY to be defined to an attribute that causes a compilation error if you use a function that is internally deprecated for the runtime. Also change a couple of places that used non-_checked functions.
2017-10-31[android] Fix compilation with recent ndk and sdk target < 16.Rodrigo Kumpera
2017-10-27Bugfix: 1.5 stop bits for serial port should set the posix stop bit flag (#5873)robotrovsky
1.5 stop bits have not been handled at all. According to this documentation of the 8250 UART: http://stanislavs.org/helppc/8250.html a set bit 2 in the LCR register means stop bits = 1.5 for 5 bit words or 2 for 6, 7 or 8 bit words. That is the reason why pyserial also sets the bit: https://github.com/pyserial/pyserial/blob/92d101613be41ecb2f2054c3f43a006fbe6f9966/serial/serialposix.py#L377
2017-10-19[runtime] Rename atomic functions from the win32 style naming to ↵Johan Lorensson
mono_atomic_<op>_<type>, with a consistent signature on all platforms, including Windows implementation. (#5767) * [runtime] Rename atomic functions from the win32 style naming to mono_atomic_<op>_<type>, with a consistent signature on all platforms. This fixes a large number of warnings on windows. * Add Windows implementaiton of mono_atomic_*. * Windows implementation of mono_atomic_* inline functions. * Changed naming typo in mono_atomic_xchg_i32Add and mono_atomic_xchg_i32Add64. * Fixed some additional signed/unsigned/volatile warnings when using mono_atomic_* * Fixed some smaller additionl warnings. * Fix Interlocked* to mono_atomic_* name change in signal.c * Additional name adjustment of atomics. Aligning more towards C11/C++11 standard namings: mono_atomic_xchg_add_i32|i64 -> mono_atomic_fetch_add_i32|i64 Changed from mono_atomic_add to mono_atomic_fetch_add in cases when return type is not used. Also includes small mingw build fix on Windows. * Aligned loads with C++11 implementation using explicit compiler barrier. On x86/x64 Windows, reading a properly aligned 8,16,32 bit volatile variable (using /volatile:ms extension) should have acquire semantics. On x64 this also includes 64-bit properly aligned volatile variables. The C++11 implementation does however include an explicit _ReadWriteBarrier in its sequentially consistent implementation to instruct compiler to not reorder load/stores. Since compiler supports two modes of volatile behavior (ms/iso) this additional barrier is probably there for consistency, independent of the behavior of volatile keyword. NOTE, the x86/x64 CPU architecture has strong guarantees regarding load/store of memory operations, so issuing a CPU memory barrier for loads should not be needed (and is not done in C++11 atomics implementation). This commit also adds a couple of optimizations for 32-bit loads and for x64, 64-bits loads. The C++11 implementation uses the same pattern loading them as 8 and 16 bits variables, so no need for Interlocked* calls to load 32-bit and for x64 64-bit variables.
2017-10-03Prepare Mono for Android NDK with unified headers (#5680)Marek Habersack
Up until NDK release 14 Android SDK included a separate set of C header files for each supported platform. NDK 14 introduced a new set of those headers (they are NOT the same as the old ones) which unifies support for all of the platforms so that bug fixes are available for all the API levels without having to backport etc. With NDK 15 the unified headers become the default ones (including when creating standalone toolchains) and with NDK 16 (in beta currently) the old per-platform headers are removed. Unfortunately, the new headers introduce breaking changes which made it impossible to build Mono with NDK configured to use them. This commit makes a handful of changes to Mono which make it build with unified headers.
2017-08-28remove redundant duplicate word 'not'HinTak
Found a consecutive 'not' pair while searching the code for somethng else.
2017-08-15[runtime] Use HOST_ defines instead of PLATFORM_ defines. (#5362)Zoltan Varga
2017-06-27Fix various compiler warnings (#5064)cherusker
* Fix compiler warnings (w32) - add explicit (long long (unsigned)) type casts - change %ld to %lld once, to match the general style of these logging messages * Fix compiler warnings (threadpool) - add explicit (void *) type casts * Fix compiler warnings (boehm) - add an explicit (long) type cast; the values are defined as gint64, an upgrade to at least "%ld" seems like a good idea - about dropping const: const does not seem to be necessary as g_getenv() returns pointers to freshly allocated buffers whenever called. const might have been used to protect the return value of g_getenv() on unix systems with earlier versions of Mono (as a comment in gmisc-unix.c suggests). keeping const here causes a compiler warning, as the const qualifier gets dropped when *env is being used with g_free(). that led to the decision to drop the qualifier altogether. * Fix compiler warnings (sgen) - specify the arguments (void) to avoid -Wstrict-prototypes warnings * Fix compiler warnings (misc - metadata) - specify the arguments (void) to avoid -Wstrict-prototypes warnings * Fix compiler warnings (misc) - specify the arguments (void) to avoid -Wstrict-prototypes warnings - add an explicit (void *) type cast; changing the return type to char* might be more usable and could be discussed - ret is not being used and can be removed; fixes a -Wunused-but-set-variable warning * Fix compiler warnings (mini) - specify the arguments (void) to avoid -Wstrict-prototypes warnings * [fixup!] Correct indentation * [fixup!] Correct (void *) - use GUINT_TO_POINTER and MONO_NATIVE_THREAD_ID_TO_UINT instead of (void *) to cast mono_native_thread_id_get () to %p * [fixup!] Correct indentation of boehm-gc.c and add FIXME * include <inttypes.h> and test the G_GINT64_FORMAT macro * [fixup!] Use G_G*_FORMAT and PRIx32 macros instead of type casts wherever possible
2017-04-26Define HAVE_STRUCT_SOCKADDR_IN6 on Windows (#4755)Joshua Peterson
This enables IPv6 support on Windows.
2017-02-27Improve build and configureCalvin
* detect sys/errno.h * Fix errenous LIBS in haiku * use HAVE_MINCORE
2017-02-27Get support libraries compilingCalvin
These return no-ops, but its enough to make it happy
2017-02-01Fixes the Mono.Posix API breakage introduced in #3985Niklas Therning
Also reverts the changes done to support/map.c. This is a generated file which shouldn't be changed directly. An alternate fix for the problem in map.c on Windows was to make sure L_SET et al are defined in mph.h which was already done for Solaris.
2017-01-23Fix a few cppcheck errors (#4281)Alexander Köplinger
* [zlib] Fix CppCheck error "Shifting a negative value is undefined behaviour" This matches what upstream now does: https://github.com/madler/zlib/blob/2edb94a3025d288dc251bc6cbb2c02e60fbd7438/inflate.c#L1529 * [scripts] Fix CppCheck error "Memory leak: nargv" * [tests] Fix CppCheck error: "Memory leak: reference" * [aot-compiler] Fix CppCheck error: "Resource leak: infile" * [metadata] Fix CppCheck error: "Uninitialized variable: ret"
2017-01-21[io-layer] Extract error (#4279)Ludovic Henry
* [file] Remove dead field * [process] Remove wapi_getpid * [process] Remove CloseHandle * [io-layer] Remove dead MONO_TRACE * [io-layer] Extract error * [io-layer] Extract wapi.h * [io-layer] Remove the io-layer
2016-11-18Merge pull request #3985 from ntherning/fix-Mono.Posix-on-windowsNiklas Therning
Fix Mono.Posix tests on Windows
2016-11-18Fixes compile error in support/stdio.c on XANiklas Therning
2016-11-17Fix Mono.Posix tests on WindowsNiklas Therning
Cleaned up Mono_Posix_FromSeekFlags() in support/map.c. It didn't properly handle the case when L_INCR, L_SET, L_XTND aren't available, like on Windows. Added Mono_Posix_Stdlib_GetLastError() to support/errno.c and changed Stdlib.GetlastError() use it. Without this Stdlib.GetlastError() wouldn't take errno in the C runtime used by libMonoPosixHelper.dll into account. On Windows the Syscall class failed to initialize due to missing functions, e.g. Mono_Posix_Syscall_get_at_fdcwd(), in libMonoPosixHelper.dll. Those readonly static fields which were initialized at class initialization have now been converted to static readonly properties so that the Syscall class can be initialized despite those functions not being defined. Cleaned up temp file handling in StdioFileStreamTest to avoid failures due to sharing violations on Windows. Fixed a bug in the StdioFileStreamTest.Write() test method when reading back the batch of bytes written in the second part of the test. Enabled the Mono.Posix test suite to run on PR builds. This test suite should from now on be green.
2016-11-16Prevent Mono.Posix from using multiple C runtimes on WindowsNiklas Therning
Since libMonoPosixHelper.dll is linked against ucrtbase.dll the C runtime wrapper functions in it will call into ucrtbase.dll. Some pinvokes in Mono.Unix.Native.Stdlib, however, bind directly to C runtime functions in msvcrt. This is problematic if a resource (heap memory, file pointer, etc) is allocated using one C runtime and then operated upon using funcitons form the other C runtime. E.g., Stdlib.malloc() calls into a wrapper in libMonoPosixHelper so it will use the ucrtbase heap while Stdlib.free() calls directly into msvcrt's free() which will abort the process since it's called with a pointer in an unknown heap. This commit adds libMonoPosixHelper wrappers for all memory and file related functions in Stdlib to ensure that all such functions use the same C runtime. Some of the Mono.Posix tests still fail but at least the test suite doesn't crash after this change. The test failures will be addressed in a future PR.
2016-10-28[System.IO.Compression] Fixed potential bug when keeping track of total read ↵Joao Matos
bytes of input stream. This didn't manifest as a bug, to to be on the safe side, replicate the behavior introduced in https://github.com/mono/mono/commit/b4d5016b5e42fec226d93fd13260b6cac80eb384 and use the same approach when calculating the total of the read bytes of the input stream.
2016-10-28[System.IO.Compression] Fixed DeflateStream input stream EOF condition.Joao Matos
What was happening is that we set the stream EOF flag to true when we could not read any more input data, and that made us early out before fully finishing the processing of the compressed data. Now the only EOF flag is set to true is if zlib's inflate() has actually finished processing the data. Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=44994#c2.
2016-10-27[System.IO.Compression] Fixed DeflateStream inflate() decompression loop.Joao Matos
This reworks the fix from https://github.com/mono/mono/commit/7c4d41a518aaf0370b882f9430752ebcd5544c10. That fix introduced a regression when handling some inputs, which lead us to ignore some left-over data from zlib's inflate output buffer. Now we only break from the loop if inflate() returns Z_BUF_ERROR. This makes sure all data is fully processed before returning to managed code. Fixes one of the bugs in https://bugzilla.xamarin.com/show_bug.cgi?id=44994#c2.
2016-08-09Define _NETBSD_SOURCE for mincore(2) (#3380)Kamil Rytarowski