[NSWI004] Is it test error or knowledge error?

Petr Tuma petr.tuma at d3s.mff.cuni.cz
Tue Oct 13 17:58:31 CEST 2020


Hi,

you're right in that the behavior is fishy, but the assert statement is 
fine (it should trigger when the specified condition is _not_ met).

 From what I saw in other cases, the compiler is quite willing to 
optimize this particular code very aggresively, which might explain the 
strange behavior you observe - in the other cases, what we had to do was 
look at the assembly to understand what is happening. If your code is 
current in the repo, we can take a peek here too.

Petr


On 13/10/2020 17:31, Jura Pelc wrote:
> I don't think they should differ and in my result, they don't. But it 
> still generates this error.
> I am not sure why I see this error when sp1 and sp2 are equal.
> 

-- 
Petr Tuma
Distributed and Dependable Systems
Faculty of Mathematics and Physics
Charles University, Czech Republic
       http://d3s.mff.cuni.cz


More information about the NSWI004 mailing list