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

Instantiation of evmc::uint256be using int flagged as error by clang-tidy #215

Closed
3 tasks done
AlexRamRam opened this issue May 15, 2023 · 1 comment
Closed
3 tasks done
Assignees
Labels
fix/bug Fixes errant behavior

Comments

@AlexRamRam
Copy link
Contributor

Affected Branch

programmability

Basic Diagnostics

  • I've pulled the latest changes on the affected branch and the issue is still present.

  • The issue is reproducible in docker

Description

In order to reproduce the issue, follow these steps:

  1. In file tests/integration/threepc_evm_end_to_end_test.cpp, test element TEST_F(threepc_evm_end_to_end_test, erc20_all), create instance of evmc::uint256be object using int (e.g. evmc::uint256be(0)) instead of using cbdc::threepc::agent::runner::uint256be_from_hex() or evmc::uint256be{}
  2. run CI lint workflow which leads to a failure on the file element that may look like:
| /usr/local/include/evmc/evmc.hpp:131:51: error: The left operand of '<<' is a garbage value [clang-analyzer-core.UndefinedBinaryOperatorResult,-warnings-as-errors]
|     return uint64_t{data[0]} | (uint64_t{data[1]} << 8) | (uint64_t{data[2]} << 16) |

This odd behavior can only observed in TEST_F(threepc_evm_end_to_end_test, erc20_all).

Code of Conduct

  • I agree to follow this project's Code of Conduct
@AlexRamRam AlexRamRam added the fix/bug Fixes errant behavior label May 15, 2023
@AlexRamRam
Copy link
Contributor Author

No longer reproducible after PR #233

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix/bug Fixes errant behavior
Projects
None yet
Development

No branches or pull requests

2 participants