[Mono-bugs] [Bug 72605][Wis] Changed - gdiplus must check malloc results
bugzilla-daemon@bugzilla.ximian.com
bugzilla-daemon@bugzilla.ximian.com
Thu, 24 Feb 2005 07:12:40 -0500 (EST)
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 vguzev@yandex.ru.
http://bugzilla.ximian.com/show_bug.cgi?id=72605
--- shadow/72605 2005-02-19 14:55:00.000000000 -0500
+++ shadow/72605.tmp.2752 2005-02-24 07:12:40.000000000 -0500
@@ -1,13 +1,13 @@
Bug#: 72605
Product: Mono: Class Libraries
Version: unspecified
OS: GNU/Linux [Other]
OS Details: Linux skif 2.4.25 #2 SMP Fri Apr 23 14:03:00 MSD 2004 i686 athlon i386 GNU/Linux
-Status: RESOLVED
-Resolution: FIXED
+Status: REOPENED
+Resolution:
Severity: Unknown
Priority: Wishlist
Component: Sys.Drawing.
AssignedTo: mono-bugs@ximian.com
ReportedBy: vguzev@yandex.ru
QAContact: mono-bugs@ximian.com
@@ -579,6 +579,199 @@
------- Additional Comments From vguzev@yandex.ru 2005-02-19 14:55 -------
Thanks, it seems to be working :)
Best regards,
Vadim B. Guzev
http://u.pereslavl.ru/~vadim/MCSharp/
+
+------- Additional Comments From vguzev@yandex.ru 2005-02-24 07:12 -------
+> Is this bag fixed in 1.1.4 version ?
+
+> No, it is fixed in svn. 1.1.4 was finalized 2 weeks ago.
+
+> lupus
+
+
+Hi, Paolo !
+
+We have tested our program ( see attach ) on libgdiplus version
+from svn ( release 41000 ).
+But the results are even worse :
+
+
+[serdyuk@itk-104 tmp]$ mono -V
+Mono JIT compiler version 1.1.4, (C) 2002-2004 Novell, Inc and
+Contributors. www.go-mono.com
+ TLS: __thread
+ GC: Included Boehm (with typed GC)
+ SIGSEGV : normal
+ Globalization: none
+[serdyuk@itk-104 tmp]$ ulimit -v 200000
+[serdyuk@itk-104 tmp]$ mono TestGDIPlus.exe 64
+
+GLib-ERROR **: gmem.c:157: failed to allocate 76 bytes
+aborting...
+
+GLib-ERROR **: gmem.c:157: failed to allocate 232 bytes
+aborting...
+
+GLib-ERROR **: gmem.c:157: failed to allocate 148 bytes
+aborting...
+
+GLib-ERROR **: gmem.c:157: failed to allocate 232 bytes
+aborting...
+
+GLib-ERROR **: gmem.c:157: failed to allocate 232 bytes
+aborting...
+Aborted
+
+
+
+--8<----------------------------------------
+[serdyuk@itk-104 tmp]$
+
+
+using System;
+using System.Threading;
+using System.Drawing;
+
+public class TestGDIPlus {
+
+ public static void Main( string[] args ) {
+
+ int nThreads = int.Parse( args [0] );
+
+ for ( int i = 0; i < nThreads; i++ ) {
+ Thread t = new Thread( new ThreadStart( TestGDIPlus.Run ) );
+ t.Start();
+ }
+
+ }
+
+ public static void Run() {
+
+ try {
+ Bitmap bmp = new Bitmap ( 1000, 1000,
+
+System.Drawing.Imaging.PixelFormat.Format32bppArgb );
+ }
+ catch ( Exception ex )
+ {
+ Console.WriteLine ( "SOURCE : " + ex.Source + "\n" +
+ "TARGETSITE : " + ex.TargetSite.ToString()
++ "\n" +
+ "Message : " + ex.Message + "\n" +
+ "StackTrace : " + ex.StackTrace);
+ }
+
+ }
+
+}
+
+
+
+
+[serdyuk@itk-104 tmp]$ mono TestGDIPlus.exe 8
+
+Unhandled Exception: System.NullReferenceException: Object reference
+not set to an instance of an object
+in <0x000b8> TestGDIPlus:Run ()
+in <0x00041> (wrapper delegate-invoke)
+System.MulticastDelegate:invoke_void ()
+
+
+Unhandled Exception: System.NullReferenceException: Object reference
+not set to an instance of an object
+in <0x000b8> TestGDIPlus:Run ()
+in <0x00041> (wrapper delegate-invoke)
+System.MulticastDelegate:invoke_void ()
+
+
+Unhandled Exception: System.NullReferenceException: Object reference
+not set to an instance of an object
+in <0x000b8> TestGDIPlus:Run ()
+in <0x00041> (wrapper delegate-invoke)
+System.MulticastDelegate:invoke_void ()
+
+
+Unhandled Exception: System.NullReferenceException: Object reference
+not set to an instance of an object
+in <0x000b8> TestGDIPlus:Run ()
+in <0x00041> (wrapper delegate-invoke)
+System.MulticastDelegate:invoke_void ()
+
+
+Unhandled Exception: System.NullReferenceException: Object reference
+not set to an instance of an object
+in <0x000b8> TestGDIPlus:Run ()
+in <0x00041> (wrapper delegate-invoke)
+System.MulticastDelegate:invoke_void ()
+
+
+Unhandled Exception: System.NullReferenceException: Object reference
+not set to an instance of an object
+in <0x000b8> TestGDIPlus:Run ()
+in <0x00041> (wrapper delegate-invoke)
+System.MulticastDelegate:invoke_void ()
+
+
+Unhandled Exception: System.NullReferenceException: Object reference
+not set to an instance of an object
+in <0x000b8> TestGDIPlus:Run ()
+in <0x00041> (wrapper delegate-invoke)
+System.MulticastDelegate:invoke_void ()
+
+
+Unhandled Exception: System.NullReferenceException: Object reference
+not set to an instance of an object
+in <0x000b8> TestGDIPlus:Run ()
+in <0x00041> (wrapper delegate-invoke)
+System.MulticastDelegate:invoke_void ()
+
+[serdyuk@itk-104 tmp]$
+--8<----------------------------------------
+
+
+With best regards,
+ Yury Serdyuk.
+
+Example that we've used:
+--8<----------------------------------------
+using System;
+using System.Threading;
+using System.Drawing;
+
+public class TestGDIPlus {
+
+ public static void Main( string[] args ) {
+
+ int nThreads = int.Parse( args [0] );
+
+ for ( int i = 0; i < nThreads; i++ ) {
+ Thread t = new Thread( new ThreadStart( TestGDIPlus.Run ) );
+ t.Start();
+ }
+
+ }
+
+ public static void Run() {
+
+ try {
+ Bitmap bmp = new Bitmap ( 1000, 1000,
+
+System.Drawing.Imaging.PixelFormat.Format32bppArgb );
+ }
+ catch ( Exception ex )
+ {
+ Console.WriteLine ( "SOURCE : " + ex.Source + "\n" +
+ "TARGETSITE : " + ex.TargetSite.ToString()
++ "\n" +
+ "Message : " + ex.Message + "\n" +
+ "StackTrace : " + ex.StackTrace);
+ }
+
+ }
+
+}
+--8<----------------------------------------
+
+