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

 
 

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

bug #14373: pnet2ms produces incorrect "using" code

Submitter:  Wayne Richards <wrichards>
Submitted:  Fri 02 Sep 2005 03:56:19 PM UTC
   
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  None
Privacy:  Public Assigned 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>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

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

 

There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

 

Follows 1 latest change.

Date Changed by Updated Field Previous Value => Replaced by
2005-09-02 wrichards Attached File- Added tmp.tar.gz, #2900

Back to the top

Powered by Savane 3.13-04b1.
Corresponding source code