[Mono-bugs] [Bug 79389][Maj] New - Entrypoint "create_z_stream" not found when using System.IO.Compression.DeflateStream

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Tue Sep 12 18:03:24 EDT 2006


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by slomo at ubuntu.com.

http://bugzilla.ximian.com/show_bug.cgi?id=79389

--- shadow/79389	2006-09-12 18:03:24.000000000 -0400
+++ shadow/79389.tmp.24181	2006-09-12 18:03:24.000000000 -0400
@@ -0,0 +1,123 @@
+Bug#: 79389
+Product: Mono: Class Libraries
+Version: 1.1
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Major
+Component: System
+AssignedTo: mono-bugs at ximian.com                            
+ReportedBy: slomo at ubuntu.com               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Entrypoint "create_z_stream" not found when using System.IO.Compression.DeflateStream
+
+Please fill in this template when reporting a bug, unless you know what you
+are doing.
+Description of Problem:
+When using System.IO.Compression.DeflateStream one get's a
+EntryPointNotFoundException for create_z_stream with mono 1.1.17.1. This
+function is nowhere in libMonoPosixHelper.so.
+
+
+Steps to reproduce the problem:
+1. Compile the code below with gmcs
+2. Run it
+
+Actual Results:
+
+Unhandled Exception: System.EntryPointNotFoundException: create_z_stream
+  at (wrapper managed-to-native)
+System.IO.Compression.DeflateStream:create_z_stream
+(System.IO.Compression.CompressionMode,bool)
+  at System.IO.Compression.DeflateStream..ctor (System.IO.Stream
+compressedStream, CompressionMode mode, Boolean leaveOpen, Boolean gzip)
+[0x00000] 
+  at System.IO.Compression.DeflateStream..ctor (System.IO.Stream
+compressedStream, CompressionMode mode) [0x00000] 
+  at (wrapper remoting-invoke-with-check)
+System.IO.Compression.DeflateStream:.ctor
+(System.IO.Stream,System.IO.Compression.CompressionMode)
+  at Test.Compress (System.Byte[] data) [0x00000] 
+  at Test.Run () [0x00000] 
+  at Test.Main (System.String[] args) [0x00000] 
+
+Expected Results:
+See it working
+
+
+How often does this happen? 
+Always
+
+Additional Information:
+
+============== TestDeflate.cs ==============
+using System;
+using System.IO;
+using System.IO.Compression;
+using NUnit.Framework; 
+
+[TestFixture]
+public class Test
+{
+    private bool Passed;
+
+    public byte[] Compress(byte[] data)
+    {
+        MemoryStream s = new MemoryStream();
+        DeflateStream deflate = new DeflateStream(s, CompressionMode.Compress);
+        deflate.Write(data, 0, data.Length);
+        return s.ToArray();
+    }
+
+    public byte[] Decompress(byte[] data)
+    {
+        MemoryStream s = new MemoryStream();
+        DeflateStream deflate = new DeflateStream(s,
+CompressionMode.Decompress);
+
+        int offset = 0;
+        while (true) 
+        {
+            int bytesRead = s.Read(data, offset, 100); 
+            if (bytesRead == 0) 
+                break; 
+            offset += bytesRead;
+        }
+        return s.ToArray();
+    }
+
+    [Test]
+    public void Run()
+    {
+        byte[] src = new byte[]{1,2,3,4,5,1,1,1,1,1,1,1};
+        byte[] dest, compressed;
+        
+        compressed = Compress(src);
+        dest = Decompress(compressed);
+
+        Passed = src == dest;
+    }
+
+    public static int Main(string[] args)
+    {
+        Test test = new Test();
+        test.Run();
+
+        if (test.Passed)
+        {
+            System.Console.WriteLine("OK");
+            return 0;
+        }
+        else
+        {
+            System.Console.WriteLine("KO");
+            return -1;
+        }
+    }
+}
+============== TestDeflate.cs ==============


More information about the mono-bugs mailing list