[ubuntu-mono] [Bug 144734] mcs optimises falsly code out in "if ( ... &&false)

Test-tools roland at verifysoft.de
Tue Sep 25 12:16:04 BST 2007


Public bug reported:

Binary package hint: mono-mcs

My collegue Martin Zaworski found a misbehaviour, we have then tracked it down to following:
if (foo++ && false) {
} else {
   //foo isn't incremented
}
So, in an conditional statement, with &&false, the left hand side doesn't run(or gets compiled), no side effects are
executed. Also no function() can be called inside there). 
Works also with assignments, optimisation switches don't matter.

Microsoft csc.exe is void of that problem

Package:  mono-mcs 1.2.4-6ubuntu4
Also affected is the current svn version (21/9/2007).

We have here now untrusted compiled binaries, unless it's verificable, that this kind of source coding isn't used,
they have to be recompiled  with a fixed version of the compiler.

** Affects: mono (Ubuntu)
     Importance: Undecided
         Status: New

-- 
mcs optimises falsly code out in "if ( ... &&false)
https://bugs.launchpad.net/bugs/144734
You received this bug notification because you are a member of MOTU Mono
Team, which is a bug contact for mono in ubuntu.



More information about the Ubuntu-mono mailing list