dotgnu-pnet
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Pnet-developers] [bug #20790] using does not call Dispose()


From: Klaus Treichel
Subject: [Pnet-developers] [bug #20790] using does not call Dispose()
Date: Sat, 22 Sep 2007 15:09:11 +0000
User-agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); de; rv:1.8.1.5) Gecko/20061023 SUSE/2.0.0.5-1.1 Firefox/2.0.0.5

Follow-up Comment #3, bug #20790 (project dotgnu-pnet):

Hi,

i tried the patch now.
using this simple (even illegal because Object doesn't implement IDisposable)
testcase:

using System;

public class Test
{
        static void Test1()
        {
                Object a = 0;

                using(a)
                {
                }
        }
}

emits the following output:

.class public auto ansi 'Test' extends ['.library']'System'.'Object'
{
.method private static hidebysig void 'Test1'() cil managed
{
        .locals init    (class ['.library']'System'.'Object')
        ldc.i4.0
        box     ['.library']'System'.'Int32'
        stloc.0
        .try {
        leave   ?L1
        } finally {
        ldloc   39504       <--- the problem is here
        brfalse ?L2
        ldloc   39504
        callvirt        instance void
[.library]System.IDisposable::Dispose()
        endfinally
?L2:
        }
?L1:
        ret
        .maxstack 1
} // method Test1

It looks like varnode is not initialized at this point.
Did you miss something in your patch?


    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?20790>

_______________________________________________
  Nachricht geschickt von/durch Savannah
  http://savannah.gnu.org/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]