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

Undefined Behavior flagged using closest point #1451

Open
bryujin opened this issue Oct 18, 2024 · 2 comments
Open

Undefined Behavior flagged using closest point #1451

bryujin opened this issue Oct 18, 2024 · 2 comments
Labels
bug Something isn't working Reviewed

Comments

@bryujin
Copy link

bryujin commented Oct 18, 2024

Running ubsan on a TOSS4 CPU system flagged an error in Axom. It looks to me like it's pointing at m_executeOnGPU. I don't see where it's being initialized, so may be the issue.

The stack trace is:

0: /axom/0.10.0/include/axom/core/Array.hpp:1718:29: runtime error: load of value 99, which is not a valid value for type 'bool'
0: #0 0x2ba2de8 in axom::Array<int, 1, (axom::MemorySpace)0>::setCapacity(int) /axom/0.10.0/include/axom/core/Array.hpp:1718:29
0: #1 0x2ba2498 in axom::Array<int, 1, (axom::MemorySpace)0>::initialize(int, int, bool) /axom/0.10.0/include/axom/core/Array.hpp:1588:3
0: #2 0x2ba1ae0 in axom::Array<int, 1, (axom::MemorySpace)0>::Array<1, (axom::MemorySpace)0, (void*)0>(int, int, int) /axom/0.10.0/include/axom/core/Array.hpp:1084:3
0: #3 0x2ba1ae0 in void axom::spin::internal::linear_bvh::propagate_aabbs<axom::SEQ_EXEC, double, 2>(axom::spin::internal::linear_bvh::RadixTree<double, 2>&, int) /axom/0.10.0/include/axom/spin/internal/linear_bvh/build_radix_tree.hpp:554:23
0: #4 0x899e456 in void axom::spin::internal::linear_bvh::build_radix_tree<axom::SEQ_EXEC, axom::ArrayView<axom::primal::BoundingBox<double, 2>, 1, (axom::MemorySpace)0>, double, 2>(axom::ArrayView<axom::primal::BoundingBox<double, 2>, 1, (axom::MemorySpace)0>, int, axom::primal::BoundingBox<double, 2>&, axom::spin::internal::linear_bvh::RadixTree<double, 2>&, double, int) /axom/core/../../axom/spin/internal/linear_bvh/build_radix_tree.hpp:641:3
0: #5 0x899d980 in void axom::spin::policy::LinearBVH<double, 2, axom::SEQ_EXEC>::buildImpl<axom::ArrayView<axom::primal::BoundingBox<double, 2>, 1, (axom::MemorySpace)0>>(axom::ArrayView<axom::primal::BoundingBox<double, 2>, 1, (axom::MemorySpace)0>, int, double, int) /axom/core/../../axom/spin/policy/LinearBVH.hpp:230:3
0: #6 0x899d6d9 in int axom::spin::BVH<2, axom::SEQ_EXEC, double, (axom::spin::BVHType)0>::initialize<axom::ArrayView<axom::primal::BoundingBox<double, 2>, 1, (axom::MemorySpace)0>>(axom::ArrayView<axom::primal::BoundingBox<double, 2>, 1, (axom::MemorySpace)0>, int) /axom/core/../../axom/spin/BVH.hpp:443:12
0: #7 0x899d370 in axom::quest::internal::DistributedClosestPointExec<2, axom::SEQ_EXEC>::generateBVHTreeImpl(axom::spin::BVH<2, axom::SEQ_EXEC, double, (axom::spin::BVHType)0>*) /axom/core/../../axom/quest/detail/DistributedClosestPointImpl.hpp:959:23
0: #8 0x899b9b1 in axom::quest::internal::DistributedClosestPointExec<2, axom::SEQ_EXEC>::generateBVHTree() /axom/core/../../axom/quest/detail/DistributedClosestPointImpl.hpp:706:12

@BradWhitlock
Copy link
Member

This merged PR initializes m_executeOnGPU. I ran into that with valgrind on rzansel.

@rhornung67
Copy link
Member

rhornung67 commented Oct 18, 2024

@BradWhitlock you beat me to it. I was just about to post a similar comment. Thanks.

@rhornung67 rhornung67 added Reviewed bug Something isn't working labels Oct 21, 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 Reviewed
Projects
None yet
Development

No branches or pull requests

3 participants