Skip to content

Commit 6fa433f

Browse files
committed
avoid aliasing in kv_tests/notify
Avoid aliasing the key and value spans within the kv_set intrinsic calls made in test contracts used for the `kv_tests/notify` unit tests.
1 parent 94582f6 commit 6fa433f

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

unittests/kv_tests.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -766,7 +766,7 @@ static const char kv_notify_wast[] = R"=====(
766766
(drop (call $kv_it_create (get_local 2) (get_local 0) (i32.const 0) (i32.const 0)))
767767
(drop (call $kv_it_create (get_local 2) (get_local 0) (i32.const 0) (i32.const 0)))
768768
(call $kv_it_destroy (i32.const 2))
769-
(drop (call $kv_set (get_local 2) (get_local 0) (i32.const 0) (i32.const 0) (i32.const 0) (i32.const 1)))
769+
(drop (call $kv_set (get_local 2) (get_local 0) (i32.const 0) (i32.const 0) (i32.const 1) (i32.const 1)))
770770
(drop (call $kv_get (get_local 2) (get_local 0) (i32.const 0) (i32.const 0) (i32.const 8)))
771771
(call $require_recipient (i64.const 11327368596746665984))
772772
)
@@ -783,7 +783,7 @@ static const char kv_notified_wast[] = R"=====(
783783
(func (export "apply") (param i64 i64 i64)
784784
(call $eosio_assert (i32.eq (call $kv_it_create (get_local 2) (get_local 0) (i32.const 0) (i32.const 0)) (i32.const 1)) (i32.const 80))
785785
(call $eosio_assert (i32.eq (call $kv_get_data (get_local 2) (i32.const 0) (i32.const 0) (i32.const 0)) (i32.const 0)) (i32.const 160))
786-
(drop (call $kv_set (get_local 2) (get_local 0) (i32.const 0) (i32.const 0) (i32.const 0) (i32.const 1)))
786+
(drop (call $kv_set (get_local 2) (get_local 0) (i32.const 0) (i32.const 0) (i32.const 1) (i32.const 1)))
787787
)
788788
(data (i32.const 80) "Wrong iterator value")
789789
(data (i32.const 160) "Temporary data buffer not empty")

0 commit comments

Comments
 (0)