-
Notifications
You must be signed in to change notification settings - Fork 198
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Mono] Compression broken on OS X #94
Comments
So it seems this error comes from misrepresentation of lengths. The stack trace shows a call to CopyTo, which presumably calls Length on the source stream. Perhaps the source stream has a bug that mis-represents how long it is, I suppose the CopyTo method will read more than what's possible. Mono links against zlib statically, and here's the description of
from http://www.zlib.net/manual.html And here and here's the code in question that links to zlib: Running on OS X 10.8.5, zlib: version 1.2.5, April 19th, 2010 Mono version 3.4.0 ((no/d4511ef Tue Mar 25 14:35:52 EDT 2014) Commit 8dd19ae |
This is not a problem on CentOS 6.5. |
Categorising as minor bug because it's only relevant on non-production OSes. |
Now it's a problem on CentOS, too. Upgrading to major. Filed a bug https://bugzilla.xamarin.com/show_bug.cgi?id=22346 |
Yeap, started ocurring on Arch Linux as well [ademar@cygnus suave]$ mono -V
Mono JIT compiler version 3.4.0 (tarball Wed Jun 25 20:39:03 UTC 2014)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
TLS: __thread
SIGSEGV: altstack
Notifications: epoll
Architecture: amd64
Disabled: none
Misc: softdebug
LLVM: supported, not enabled.
GC: sgen
[ademar@cygnus suave]$ uname -a
Linux cygnus 3.15.3-1-ARCH #1 SMP PREEMPT Tue Jul 1 07:32:45 CEST 2014 x86_64 GNU/Linux |
Perhaps we should use a different compression lib ? |
Yes we should - perhaps we can use a .Net-only compression lib inside mono, even? Do you think they'd accept that as a PR? Right now they're using a C-based lib. |
Yeah, I think it makes sense. I wonder why it has not been done already. |
I think the bug is here https://github.com/mono/mono/blob/master/mcs/class/System/System.IO.Compression/DeflateStream.cs#L460 It should not throw upon Z_BUF_ERROR according to the docs
|
The problem here was that we were passing an empty array to GZipStream. |
This is when we're running compression in FsCheck property which tries many different combinations of the same code path. The unit test that doesn't run it in a loop doesn't seem to fail, so it might be some global variable that messes it up, or there might be something that is not threadsafe in mono.
The text was updated successfully, but these errors were encountered: