Skip to content

Fix use after scope error active_transactions.vacancy test#4002

Merged
thsfs merged 1 commit intonanocurrency:developfrom
thsfs:fix_use_after_scope_vacancy_test
Nov 23, 2022
Merged

Fix use after scope error active_transactions.vacancy test#4002
thsfs merged 1 commit intonanocurrency:developfrom
thsfs:fix_use_after_scope_vacancy_test

Conversation

@thsfs
Copy link
Copy Markdown
Contributor

@thsfs thsfs commented Nov 22, 2022

Error got when running ASAN test on core_test.

=================================================================
==core_test==255418==ERROR: AddressSanitizer: stack-use-after-scope on address 0x7fff63ab5320 at pc 0x5626fe4da09e bp 0x7fff63ab4260 sp 0x7fff63ab4258
WRITE of size 1 at 0x7fff63ab5320 thread T0
    #0 0x5626fe4da09d in std::__atomic_base<bool>::store(bool, std::memory_order) /usr/lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/atomic_base.h:457:2
    #1 0x5626fe4da09d in std::__atomic_base<bool>::operator=(bool) /usr/lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/atomic_base.h:349:2
    #2 0x5626fe4ba1a9 in std::atomic<bool>::operator=(bool) /usr/lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/atomic:80:22
    #3 0x5626fe4aa412 in active_transactions_vacancy_Test::TestBody()::$_4::operator()() const /home/***/nano-node/nano/core_test/active_transactions.cpp:1305:55

@thsfs thsfs merged commit f05cb7d into nanocurrency:develop Nov 23, 2022
@thsfs thsfs added the bug label Nov 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants