Bug 147241

Summary: FPU calculations are not correct
Product: [Developer tools] valgrind Reporter: Marek Baczyński <imbaczek>
Component: generalAssignee: Julian Seward <jseward>
Status: RESOLVED DUPLICATE    
Severity: normal CC: njn
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed In:

Description Marek Baczyński 2007-06-26 13:07:40 UTC
Version:           valgrind-3.2.1-Debian (using KDE KDE 3.5.6)
Installed from:    Ubuntu Packages
Compiler:          gcc version 4.1.2 (Ubuntu 4.1.2-0ubuntu4) 
OS:                Linux

I tried to run Spring (an RTS game engine) on valgrind. Spring does a synced simulation, that is it requires all computers to have exact same answers from all floating point operations it uses and it manages to do that quite well using streflop and checksumming. Unfortunately, valgrind messes something up and spring checks detect this very early. (Specifically, rts/System/myMath.cpp - the very first assertion fails under valgrind, but works fine natively.) You can check out spring release version at https://taspring.clan-sy.com/svn/spring/tags/taspring_0.74b3 (a svn repo.)

Why I need valgrind for spring is that memory corruption is the second most common desync problem and hoped that this fantastic tool could help find some; unfortunately, it's best to seek for errors by replaying games and replays depend on exactly the same math.
Comment 1 Nicholas Nethercote 2009-06-29 09:46:00 UTC
I suspect this is caused by bug 197915.

*** This bug has been marked as a duplicate of bug 197915 ***