[1.0] Update payloadless
contract to avoid UB in shift operator.
#684
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hopefully resolves #425.
Issue #425 reports a rare test failure with
performance_test_basic_read_only_trxs
where we see a wasm exception when running one of the 50 identical transactions:The contract used in the test (
payloadless
) callsoperator<<()
with a rhs value greater than the number of bits in lhs, which is UB.This PR corrects this UB whith the hope that it might resolves the issue.
Is the contract code optimized out?
Looking at the log when running the test, I see:
The times of
0.00000000000000000us / transaction
seem suspicious to me. Possibly the code is optimized out?I uncommented out the
eosio::print_f(" %u", p);
in the contract, but didn't see any significant difference in the log output.