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

Fix ASAN warning in rpc.account_history #1888

Merged

Conversation

2 participants
@wezrule
Copy link
Collaborator

commented Apr 9, 2019

[ RUN      ] rpc.account_history
[1m/Users/user/Library/raiblocks/nano/core_test/rpc.cpp:1223:52:[1m[31m runtime error: [1m[0m[1mdowncast of address 0x611000050a40 which does not point to an object of type ‘nano::send_block’[1m[0m
[1m0x611000050a40:[1m[30m note: [1m[0mobject is of type ‘nano::state_block’[1m[0m
39 00 80 3c  b0 6a 2d 09 01 00 00 00  b0 31 1e a5 57 08 d6 a5  3c 75 cd bf 88 30 02 59  c6 d0 18 52
[1m[32m              ^~~~~~~~~~~~~~~~~~~~~~~[1m[0m
             vptr for ‘nano::state_block’
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior

Just pass the block directly like all other tests do instead of trying to cast it.

@wezrule wezrule added the sanitizers label Apr 9, 2019

@wezrule wezrule added this to the V19.0 milestone Apr 9, 2019

@wezrule wezrule self-assigned this Apr 9, 2019

@wezrule wezrule requested a review from argakiig Apr 9, 2019

@wezrule wezrule added this to CP3 (2019-04-10) in V19 Apr 9, 2019

@wezrule wezrule merged commit b4a5dcc into nanocurrency:master Apr 9, 2019

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@wezrule wezrule deleted the wezrule:fix_asan_warning_rpc_account_history branch Apr 9, 2019

guilhermelawless added a commit to guilhermelawless/nano-node that referenced this pull request Apr 15, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.