Skip to content
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

Memory Resources Shouldn't Return nullptr (2024.08.08.) #290

Open
krasznaa opened this issue Aug 8, 2024 · 0 comments
Open

Memory Resources Shouldn't Return nullptr (2024.08.08.) #290

krasznaa opened this issue Aug 8, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@krasznaa
Copy link
Member

krasznaa commented Aug 8, 2024

@stephenswat brought this up in the past, at which point I admittedly didn't pay maybe enough attention to it. But now, at least with a recent oneAPI / clang version, I bumped into this error:

[ RUN      ] core_memory_resource_tests/memory_resource_test_basic.allocations/host_resource
/usr/lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/memory_resource:122:7: runtime error: null pointer returned from function declared to never return null
/usr/lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/memory_resource:121:20: note: returns_nonnull attribute specified here
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /usr/lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/memory_resource:122:7 
[       OK ] core_memory_resource_tests/memory_resource_test_basic.allocations/host_resource (0 ms)

We'll need to go through all memory resources, and make sure that they consistently throw std::bad_alloc when something goes wrong... 🤔

@krasznaa krasznaa added the bug Something isn't working label Aug 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants