wrong decompilation

9 posts, 0 answers
  1. jake almer
    jake almer avatar
    6 posts
    Member since:
    Jul 2006

    Posted 13 May 2011 Link to this post

    I know its just a beta but I thought I point out one incorrect decompilation I stumbled upon when reviewing some code....

    what JustDecompile gave:  http://www.pastie.org/1896734
    what the actual code is:   http://www.pastie.org/1896731

    There should be an outer else that throws an exception. JustDecompile moves it around and gives it completely different meaning.

    ILSpy confirmed I'm not crazy and showed the correct decompilation.
  2. Tsviatko Yovtchev
    Admin
    Tsviatko Yovtchev avatar
    408 posts

    Posted 24 May 2011 Link to this post

    Hello jake,

     That seems to be a problem indeed. It'd be really nice if you could send over the actual DLL that produces this code. If that is not possible the MSIL of the ProcessRequest method will also do. We have to see what's inside that method so that we can tackle this problem. 

    You could do another post here or contact me directly by e-mail - tsviatko.yovtchev at telerik.com.

    Kind regards,
    Tsviatko Yovtchev
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>

  3. DevCraft banner
  4. jake almer
    jake almer avatar
    6 posts
    Member since:
    Jul 2006

    Posted 24 May 2011 Link to this post

    repro sample sent
  5. Bill
    Bill avatar
    28 posts
    Member since:
    Apr 2011

    Posted 26 May 2011 Link to this post

    Another wrong decompilation -- Try-Catch blocks:

    Example is System.Drawing.dll :: Image.Dispose(disposing)

    Protected Overridable Sub Dispose(ByVal disposing As Boolean)
    If (Me.nativeImage <> IntPtr.Zero)
    Gdip.GdipDisposeImage(New HandleRef(Me, Me.nativeImage))
    If (ClientUtils.IsSecurityOrCriticalException(exception2))
    Throw
    End If
    Me.nativeImage = IntPtr.Zero
    End If
    Try
    Catch (Dim exception2 As Exception)
    Finally
    End Try
    End Sub

     



    The Try-Catch block should wrap the code. Shows wrong in C# as well.
  6. Chris
    Admin
    Chris avatar
    221 posts

    Posted 27 May 2011 Link to this post

    Hi Bill,
    Thanks a lot for reporting this issue. We've logged it for fixing and the fix will be available for the Q2 release (in July) or even earlier in some of the next internal builds.

    Best wishes,
    Chris
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>

  7. Bill
    Bill avatar
    28 posts
    Member since:
    Apr 2011

    Posted 10 Jun 2011 Link to this post

    Constant members are not showing correctly.

    from System.Int32 in mscorlib.dll:

    Public Structure Int32
      Public Shared MaxValue As Integer
     
     Public Shared MinValue As Integer
    ...

    should be:

    Public Structure Int32
      Public Const MaxValue As Integer = 2147483647

     

     

     

     

     

      Public Const MinValue As Integer = -2147483648

     

     

     

    ...

    It is wrong in C# as well.

     

     

     

  8. Tsviatko Yovtchev
    Admin
    Tsviatko Yovtchev avatar
    408 posts

    Posted 16 Jun 2011 Link to this post

    Hello Bill,

     Yeah we are aware of this problem. It is on our list. Please, stay tuned.

    All the best,
    Tsviatko Yovtchev
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>

  9. Bill
    Bill avatar
    28 posts
    Member since:
    Apr 2011

    Posted 24 Jun 2011 Link to this post

    This is for version 2011.1.624.2.

    In mscorlib.dll:

    Most public constructors for System.IO.FileStream are missing code in C# and Visual Basic.
    For example:

    Public Sub New(ByVal path As String, ByVal mode As FileMode)
    End Sub

    It does show correctly in the IL.  FWIW, there are three public constructor that show all the code. One, for example:

    Public Sub New(ByVal path As String, ByVal mode As FileMode, ByVal rights As FileSystemRights, ByVal share As FileShare, ByVal bufferSize As Integer, ByVal options As FileOptions)
     MyBase.New()
     Dim secAttrs As SECURITY_ATTRIBUTES = FileStream.GetSecAttrs(share)
     Me.Init(path, mode, 0, rights, True, share, bufferSize, options, secAttrs, Path.GetFileName(path), False, False)
    End Sub

  10. Yordan Dikov
    Admin
    Yordan Dikov avatar
    69 posts

    Posted 05 Jul 2011 Link to this post

    Hi Bill,

     Thanks for the report, we really appreciate it. The problem is now on our list and will be fixed. Stay tuned!

    Greetings,
    Yordan Dikov
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>

Back to Top
DevCraft banner