Jump to content

ASAN vs. Valgrind Experience


Recommended Posts

Curious if anyone has gotten valgrind to work with 0AD builds. Asking because some of the development documentation references valgrind (https://trac.wildfiregames.com/wiki/CodeQuality#Valgrind) which takes something on the order of a 10-20x hit in runtime performance while ASAN is closer to 2-4x perf hit (https://developers.redhat.com/blog/2021/05/05/memory-error-checking-in-c-and-c-comparing-sanitizers-and-valgrind#performance). At that point, running replays or even full games under ASAN may be reasonable compared to Valgrind which isn't feasible.

Link to comment
Share on other sites

59 minutes ago, jprahman said:

Curious if anyone has gotten valgrind to work with 0AD builds. Asking because some of the development documentation references valgrind (https://trac.wildfiregames.com/wiki/CodeQuality#Valgrind) which takes something on the order of a 10-20x hit in runtime performance while ASAN is closer to 2-4x perf hit (https://developers.redhat.com/blog/2021/05/05/memory-error-checking-in-c-and-c-comparing-sanitizers-and-valgrind#performance). At that point, running replays or even full games under ASAN may be reasonable compared to Valgrind which isn't feasible.

Some people have done for a while you need to pass an extra flag when updating workspaces.sh to make use of it

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...