|
To whom it may concern; I'm a licensed user of .Net Reflector (v. 7.4.1.180) and discovered a problem that I'd like to have fixed. If you reflect / dissasemble .Net framework's mscorlib assembly, specifically System.IO.BinaryReader.ReadInt64(); .Net Reflector reports: public virtual long ReadInt64() { this.FillBuffer(8); uint num = (uint) (((this.m_buffer[0] | (this.m_buffer[1] << 8)) | (this.m_buffer[2] << 0x10)) | (this.m_buffer[3] << 0x18)); uint num2 = (uint) (((this.m_buffer[4] | (this.m_buffer[5] << 8)) | (this.m_buffer[6] << 0x10)) | (this.m_buffer[7] << 0x18)); return (long) ((num2 << 0x20) | num); } I've highlighted the obvious defect in red (specifically num2 << 0x20). Obviously this method (when actually called) does work correctly; so the reported C# code is incorrect. When looking at the actual IL, we have... ... L_005e: stloc.1 L_005f: ldloc.1 L_0060: conv.u8 L_0061: ldc.i4.s 0x20 L_0063: shl L_0064: ldloc.0 L_0065: conv.u8 L_0066: or L_0067: ret ...which indicates num2 and num on the return line should be cast to a ulong prior to any bit manipulation. Ex: return (long)(((ulong)num2 << 0x20) | (ulong)num); This corrected code actually does function correctly. Is this something you folks can look into and deliver a fix for? Sincerely, John R. Nannenga |
|
I've put it into our bug tracking system as RP-2462. We are currently quite close to releasing 7.5 so we won't be able to fix it for that version of the product. We will get back to regular EAP releases after 7.5 goes out. |