-
Notifications
You must be signed in to change notification settings - Fork 2
Memory Sanitizer
Memory Sanitizer helps in finding uninitialized use of variables, leaks and other memory-related behaviour that causes can cause UB.
Due to reasons mentioned below this work has been added to future work. It was originally intended to be completed with GSoC 2020 Phase II.
However, due to restricting nature of MEMSAN and limitations, it is only available with clang
and is hard to set up correctly. See the discussion about it on this issue.
I have added the memory sanitizer but here is a problem.
Not uBLAS.tensor but Boost. Test framework has an issue of memory-sanitizer
use of uninitialized
value. I am not sure if it is really a true issue or false positive of MEMSAN. See this error report from Memory Sanitizer. However, I see many Stackoverflow questions that mention false positives for MEMSAN. Even its wiki says some things to do before using MEMSAN.If you want MemorySanitizer to work properly and not produce any false positives, you must ensure that all the code in your program and in libraries it uses is instrumented (i.e. built with -fsanitize=memory). In particular, you would need to link against MSan-instrumented C++ standard library. We recommend using libc++ for that purpose. See https://github.com/google/sanitizers/wiki/MemorySanitizerLibcxxHowTo
I even tried using
libc++
and linked a demo code to it with sanitizer enabled and gotuninitialized use of memory
error forstd::cout<<"Hello world"
. See this:The current CI is failing for
Linux Clang
due to the above sanitizer reported an error in Boost. Test
I thank our mentor Cem for his constant support and help in achieving our goals. We always find him helpful and he was always easy to reach for help or discussion regarding the work. We would also like to thank Google for the Google Summer of Code Programme, without which all these wouldn't be possible. Lastly, we express our gratitude to our parents for helping and providing us with all resources to carrying out our work nicely from our homes.
- Project Proposal
- Milestones and Tasks
- Implementation
- cpp20
- github-actions
- features/tidy
- features/format
- features/cmake
- Documentation
- Pull Requests
- Future Work