E3SM-Project / E3SM-Project/E3SM

MPAS ezxml issues when building with address sanitizer options

Open
#1,973 1 comment 0 reactions 1 assignee Claimed by @matthewhoffman View on GitHub
MPAS-ocean
Dominant language
Fortran
Stars
440
Forks
481
Avg merge
4d 6h
Merged PRs (30d)
36

Description

I'm trying to build the model with GCC's address sanitizer to clean up issues with memory leaks, out of bounds accesses, and reading uninitialized data.
Trying to do this with the fully coupled model gives me build errors in MPAS ocean and sea ice, as they rely on ezxml, which although we don't care about it per-se, leaks memory. The address sanitizer reports these as errors when running ezxml and causes the build to fail.
Workarounds I'm considering:
Remove the address sanitizer flags from ezxml (easy, though I still get errors in ezxml for some reason)
Fix the memory leaks in ezxml (potentially difficult, but probably not)
~~Upgrade ezxml~~ (ezxml hasn't been updated in years)
Replace ezxml with another tool, ideally one that doesn't require compilation (no idea how difficult that would be)

As I have lots of other pieces of the code I can currently use the address sanitizer with (once I get it linked properly...), this is a low priority, but something to keep in mind for the future.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.