Skip to content

Disable memory sanitizer due to lack of instrumented dependencies#3014

Merged
oskooi merged 1 commit intoNanoComp:masterfrom
oskooi:memory_sanitizer_disable
May 4, 2025
Merged

Disable memory sanitizer due to lack of instrumented dependencies#3014
oskooi merged 1 commit intoNanoComp:masterfrom
oskooi:memory_sanitizer_disable

Conversation

@oskooi
Copy link
Copy Markdown
Collaborator

@oskooi oskooi commented May 3, 2025

The clang MemorySanitizer run daily as part of the Github Actions workflow has recently been reporting this error for each of the 23 C++ unit tests in meep/tests:

SUMMARY: MemorySanitizer: use-of-uninitialized-value
/home/runner/work/meep/meep/src/time.cpp:34:41 in __cxx_global_var_init
Exiting
FAIL aniso_disp (exit status: 1)

This error is triggered by a global variable in time.cpp and is likely a false positive (since it has not previously appeared) as described in the LLVM docs:

MemorySanitizer requires that all program code is instrumented. 
This also includes any libraries that the program depends on, even libc. 
Failing to achieve this may result in false reports.

A possible fix is to compile libc++ with the instrumentation as described here.

For the time being, this PR disables the memory sanitizer.

@codecov-commenter
Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 73.79%. Comparing base (f29a8c7) to head (74e20d4).
Report is 57 commits behind head on master.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3014      +/-   ##
==========================================
- Coverage   73.81%   73.79%   -0.03%     
==========================================
  Files          18       18              
  Lines        5423     5445      +22     
==========================================
+ Hits         4003     4018      +15     
- Misses       1420     1427       +7     

see 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@oskooi oskooi merged commit c5b2441 into NanoComp:master May 4, 2025
5 checks passed
@oskooi oskooi deleted the memory_sanitizer_disable branch May 4, 2025 05:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants