Skip to content

Poison allocated memory when ASSERTIONS are enabled#349

Merged
bonachea merged 1 commit into
BerkeleyLab:mainfrom
bonachea:poison-mem
Jul 23, 2026
Merged

Poison allocated memory when ASSERTIONS are enabled#349
bonachea merged 1 commit into
BerkeleyLab:mainfrom
bonachea:poison-mem

Conversation

@bonachea

Copy link
Copy Markdown
Member

Memory allocated by prif_allocate[_coarray] is uninitialized, but often happens to be zero which can hide problems. When assertions are enabled, poison some of the first page with non-zero values that are more likely to trigger failures in downstream use of uninitialized memory

Memory allocated by `prif_allocate[_coarray]` is uninitialized, but often
happens to be zero which can hide problems. When assertions are enabled,
poison some of the first page with non-zero values that are more likely to
trigger failures in downstream use of uninitialized memory

@ktras ktras left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@bonachea
bonachea merged commit fe1a854 into BerkeleyLab:main Jul 23, 2026
55 checks passed
@bonachea
bonachea deleted the poison-mem branch July 23, 2026 00:27
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