-
Notifications
You must be signed in to change notification settings - Fork 32
Fix crash querying whether an exec space uses an allocator id. #1661
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Should return false for invalid allocator id.
kennyweiss
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @gunney1
src/axom/core/memory_management.hpp
Outdated
| * For Umpire allocator ids, the MemorySpace is the Umpire memory | ||
| * space. For MALLOC_ALLOCATOR_ID, the MemorySpace is | ||
| * MemorySpace::Malloc. Other values have no corresponding MemorySpace | ||
| * and will cause an unrecoverable exception. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clarify: It's calling processAbort -- is it fair to call that an unrecoverable exception? Please consider rephrasing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will do. Thanks.
BradWhitlock
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
Arlie-Capps
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, Brian.
We can query whether an execution space uses a certain axom allocator id. If we pass the invalid allocator id, it crashes. This fixes the code to return false instead of crashing.
PR #1654 depends on this one.