You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
clang provides several useful tools for detecting potential errors at runtime, including ASan and UBSan.
So far I've mostly used valgrind to discover memory leaks and unitialized memory.
A few issues may arise:
oshu! is a game, and while performance is not a top priority issue here, some paths may become hard to trigger if the game is unplayable.
oshu! has a lot of complex dependencies, like pango or ffmpeg. If something somewhere in that big stack runs some barely legal instructions, it may pollute the sanitizer's output. In fact, I suspect pango leaks some memory for a reason I cannot grasp.
ASAN is pretty much like valgrind. It found leaks related to libX11 and fontconfig, the former indirectly caused by SDL and the latter by pango, without a doubt.
MSAN stops the program on the first use of uninitialized memory, and that happens to be caused by SDL_Init. Not much we can do 😢
UBSAN didn't report anything. This is good news.
With a complete test suite, we could run all these sanitizers to ensure the modules behave well, and avoid as much as possible the dependencies. The independent beatmap module can be tested thoroughly #44. To be continued!
clang provides several useful tools for detecting potential errors at runtime, including ASan and UBSan.
So far I've mostly used valgrind to discover memory leaks and unitialized memory.
A few issues may arise:
oshu! is a game, and while performance is not a top priority issue here, some paths may become hard to trigger if the game is unplayable.
oshu! has a lot of complex dependencies, like pango or ffmpeg. If something somewhere in that big stack runs some barely legal instructions, it may pollute the sanitizer's output. In fact, I suspect pango leaks some memory for a reason I cannot grasp.
Related to #53.
The text was updated successfully, but these errors were encountered: