bugDotGNU Portable.NET - Bugs: bug #14373, pnet2ms produces incorrect...

 
 

You are not allowed to post comments on this tracker with your current authentification level.

bug #14373: pnet2ms produces incorrect "using" code

Submitted by:  Wayne Richards <wrichards>
Submitted on:  Fri 02 Sep 2005 03:56:19 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: None
Privacy: PublicAssigned to: None
Open/Closed: Open

Fri 02 Sep 2005 03:56:19 PM UTC, original submission:

Attached is sample code which runs correctly under pnet-0.7.2 and 6.2. However, pnet2ms produces various exceptions, evidently because Dispose() is being called on a null object. Pseudocode:

public string fail_function()
{
using (RegistryKey rk = Registry.LocalMachine.OpenSubKey("some non-existent key"))
{
if (rk!=null) do something // rk is null
}

return "something";
}

After running pnet2ms, the function gets a SystemExecutionEngineException, but this may vary. Seems like the problem is that the "using" section runs Dispose() on the
null object rk.

Wayne Richards <wrichards>

 

Attached Files
file #3433:  tmp.tar.gz added by wrichards (655B - application/gzip - Class1.cs and a Makefile which produce this error. )

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

Do you think this task is very important?
If so, you can click here to add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.

 

Please enter the title of George Orwell's famous dystopian book (it's a date):

 

 

Follows 1 latest change.

Date Changed By Updated Field Previous Value => Replaced By
Fri 02 Sep 2005 03:56:19 PM UTCwrichardsAttached File-=>Added tmp.tar.gz, #2900

Back to the top


Powered by Savane 3.1-cleanup