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

Segfault on Marvell from our finalization stack #2542

Closed
DavidPoliakoff opened this issue Nov 6, 2019 · 0 comments
Closed

Segfault on Marvell from our finalization stack #2542

DavidPoliakoff opened this issue Nov 6, 2019 · 0 comments
Assignees
Labels
Bug Broken / incorrect code; it could be Kokkos' responsibility, or others’ (e.g., Trilinos) Compiler Issue An issue that Kokkos cannot / should not fix; Kokkos must communicate to relevant vendor

Comments

@DavidPoliakoff
Copy link
Contributor

Via a collaborator at Marvell (note that they're talking about this being on a Marvell platform, it won't reproduce on x86):

The GNU C++ Standard Library implements std::stack<T> in terms of std::deque<T>.

When compiling with clang/LLVM and using the GNU (GCC) C++ Standard Library (any recent version between GCC 7.3 and GCC 9.2), std::deque SEGV's during the unwinding of the atexit(3C) handlers at program termination. However, this bug is not observable when building with GCC.

The workaround is to replace std::stack<T> with std::list<T>.

As an added bonus, std::list<T> provides constant insertion and deletion time complexity, which translates to better run-time performance. As opposed to std::deque<T> which does not provide the same constant time complexity for inserts/removals, since std::deque<T> is implemented as a segmented array.
@DavidPoliakoff DavidPoliakoff added the Bug Broken / incorrect code; it could be Kokkos' responsibility, or others’ (e.g., Trilinos) label Nov 6, 2019
@crtrott crtrott added Blocks Promotion Overview issue for release-blocking bugs Compiler Issue An issue that Kokkos cannot / should not fix; Kokkos must communicate to relevant vendor labels Feb 26, 2020
@crtrott crtrott added this to To do in Milestone: Release 3.1 via automation Feb 26, 2020
@crtrott crtrott added this to the Tentative 3.1 Release milestone Feb 26, 2020
@crtrott crtrott added InDevelop and removed Blocks Promotion Overview issue for release-blocking bugs labels Mar 5, 2020
@crtrott crtrott moved this from To do to Done in Milestone: Release 3.1 Mar 10, 2020
@crtrott crtrott closed this as completed Apr 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Broken / incorrect code; it could be Kokkos' responsibility, or others’ (e.g., Trilinos) Compiler Issue An issue that Kokkos cannot / should not fix; Kokkos must communicate to relevant vendor
Projects
No open projects
Development

No branches or pull requests

2 participants