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

High concurrency throughput has issues: #2

Closed
gh-markt opened this issue May 2, 2024 · 1 comment
Closed

High concurrency throughput has issues: #2

gh-markt opened this issue May 2, 2024 · 1 comment

Comments

@gh-markt
Copy link

gh-markt commented May 2, 2024

No description provided.

@gh-markt
Copy link
Author

gh-markt commented May 2, 2024

==17418==ERROR: AddressSanitizer: heap-use-after-free on address 0x602000002050 at pc 0x000000515b79 bp 0x7f3d644fd990 sp 0x7f3d644fd988
READ of size 8 at 0x602000002050 thread T2
#0 0x515b78 in std::__atomic_base<DataNode<int, int>>::operator DataNode<int, int>() const (/home/markt/CLionProjects/smart_ptr/cmake-build-debug/smart_ptr+0x515b78)
#1 0x510a0d in std::atomic<DataNode<int, int>>::operator DataNode<int, int>() const (/home/markt/CLionProjects/smart_ptr/cmake-build-debug/smart_ptr+0x510a0d)
#2 0x511973 in TreeNode<int, int>::GetData() (/home/markt/CLionProjects/smart_ptr/cmake-build-debug/smart_ptr+0x511973)
#3 0x51044d in TreeNode<int, int>::swap_window(TreeNode<int, int>, DataNode<int, int>) (/home/markt/CLionProjects/smart_ptr/cmake-build-debug/smart_ptr+0x51044d)
#4 0x50e84c in RBTree<int, int>::Remove(int) (/home/markt/CLionProjects/smart_ptr/cmake-build-debug/smart_ptr+0x50e84c)
#5 0x50ada9 in operator() /home/markt/CLionProjects/smart_ptr/main.cpp:20
#6 0x50bee5 in __invoke_impl<void, test_concurrent_inserts_and_deletes(RBTree<int, int>&)::<lambda()> > /usr/include/c++/13.2.0/bits/invoke.h:61
#7 0x50bea8 in __invoke<test_concurrent_inserts_and_deletes(RBTree<int, int>&)::<lambda()> > /usr/include/c++/13.2.0/bits/invoke.h:96
#8 0x50be55 in _M_invoke<0> /usr/include/c++/13.2.0/bits/std_thread.h:292
#9 0x50be29 in operator() /usr/include/c++/13.2.0/bits/std_thread.h:299
#10 0x50be0d in _M_run /usr/include/c++/13.2.0/bits/std_thread.h:244
#11 0x7f3d67c2f452 (/usr/lib64/libstdc++.so.6+0xe4452)
#12 0x7f3d67873d56 in start_thread (/lib64/libc.so.6+0x94d56)
#13 0x7f3d678f86a7 in __clone3 (/lib64/libc.so.6+0x1196a7)

0x602000002050 is located 0 bytes inside of 8-byte region [0x602000002050,0x602000002058)
freed by thread T2 here:
#0 0x4bb938 in operator delete(void*, unsigned long) (/home/markt/CLionProjects/smart_ptr/cmake-build-debug/smart_ptr+0x4bb938)
#1 0x5142b8 in RBTree<int, int>::fix_delete(std::vector<TreeNode<int, int>, std::allocator<TreeNode<int, int>> >&) (/home/markt/CLionProjects/smart_ptr/cmake-build-debug/smart_ptr+0x5142b8)
#2 0x5102c6 in RBTree<int, int>::fix_window_color(std::vector<TreeNode<int, int>, std::allocator<TreeNode<int, int>> >&, int) (/home/markt/CLionProjects/smart_ptr/cmake-build-debug/smart_ptr+0x5102c6)
#3 0x50e834 in RBTree<int, int>::Remove(int) (/home/markt/CLionProjects/smart_ptr/cmake-build-debug/smart_ptr+0x50e834)
#4 0x50ada9 in operator() /home/markt/CLionProjects/smart_ptr/main.cpp:20
#5 0x50bee5 in __invoke_impl<void, test_concurrent_inserts_and_deletes(RBTree<int, int>&)::<lambda()> > /usr/include/c++/13.2.0/bits/invoke.h:61
#6 0x50bea8 in __invoke<test_concurrent_inserts_and_deletes(RBTree<int, int>&)::<lambda()> > /usr/include/c++/13.2.0/bits/invoke.h:96
#7 0x50be55 in _M_invoke<0> /usr/include/c++/13.2.0/bits/std_thread.h:292
#8 0x50be29 in operator() /usr/include/c++/13.2.0/bits/std_thread.h:299
#9 0x50be0d in _M_run /usr/include/c++/13.2.0/bits/std_thread.h:244
#10 0x7f3d67c2f452 (/usr/lib64/libstdc++.so.6+0xe4452)

@gh-markt gh-markt closed this as not planned Won't fix, can't repro, duplicate, stale May 2, 2024
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

No branches or pull requests

1 participant