Re: [Ikvm-developers] Code quality issues - infinite loop
Brought to you by:
jfrijters
|
From: Marius U. <mar...@xa...> - 2013-11-01 10:54:13
|
Hey! Thanks for applying the patch! Marius Jeroen Frijters <je...@su...> wrote: >Hi Marius, > >Thanks. I've fixed this in cvs. > >BTW, you don't need to check "other.HasValue" that is identical to "other != null". > >Regards, >Jeroen > >> -----Original Message----- >> From: Marius Ungureanu [mailto:mar...@xa...] >> Sent: Friday, November 1, 2013 5:52 >> To: ikv...@li... >> Subject: [Ikvm-developers] Code quality issues - infinite loop >> >> Hey guys! >> >> I was checking out code with a source analysis tool open and noticed >> these two issues [0]. >> >> To explain this issue, I need to add more context [1]. >> >> As you can see, we're casting to a nullable type. The first null check >> is perfect, so we don't have issues from the 'as' cast. But then, we >> send the MemberRefKey? variable, for example, and it the method that's >> used is Equals(object), not Equals(MemberRefKey). Therefore, adding a >> .HasValue and .Value should fix this infinite loop we could hit on. >> >> Thanks! >> >> >> [0] - https://gist.github.com/Therzok/1003436f65b804ecec67 >> [1] - https://gist.github.com/Therzok/ba503926bd5bd11692c1 >> >> ------------------------------------------------------------------------ >> ------ >> Android is increasing in popularity, but the open development platform >> that developers love is also attractive to malware creators. Download >> this white paper to learn more about secure code signing practices that >> can help keep Android apps secure. >> http://pubads.g.doubleclick.net/gampad/clk?id=65839951&iu=/4140/ostg.clk >> trk >> _______________________________________________ >> Ikvm-developers mailing list >> Ikv...@li... >> https://lists.sourceforge.net/lists/listinfo/ikvm-developers |