[Chapel Merge] Fix problems with CHPL_SANITIZE after PR #18880

Branch: refs/heads/main
Revision: 97c7b46
Author: mppf
Link: Fix problems with CHPL_SANITIZE after PR #18880 by mppf · Pull Request #18974 · chapel-lang/chapel · GitHub
Log Message:

Merge pull request #18974 from mppf/follow-18880-asan

Fix problems with CHPL_SANITIZE after PR #18880

This PR fixes testing failures with address sanitizer configurations
after PR #18880.

I tested this fix with gcc and clang with the instructions in
https://chapel-lang.org/docs/developer/bestPractices/Sanitizers.html#best-practices-sanitizers

Reviewed by @ronawho - thanks!