File tree Expand file tree Collapse file tree 3 files changed +20
-1
lines changed
tests/misc_testsuite/threads Expand file tree Collapse file tree 3 files changed +20
-1
lines changed Original file line number Diff line number Diff line change @@ -411,6 +411,7 @@ impl WastTest {
411411 "misc_testsuite/memory64/more-than-4gb.wast" ,
412412 // shared memories + pooling allocator aren't supported yet
413413 "misc_testsuite/memory-combos.wast" ,
414+ "misc_testsuite/threads/atomics-end-of-memory.wast" ,
414415 "misc_testsuite/threads/LB.wast" ,
415416 "misc_testsuite/threads/LB_atomic.wast" ,
416417 "misc_testsuite/threads/MP.wast" ,
Original file line number Diff line number Diff line change @@ -747,7 +747,7 @@ pub fn validate_atomic_addr(
747747 }
748748
749749 let length = u64:: try_from ( def. current_length ( ) ) . unwrap ( ) ;
750- if !( addr. saturating_add ( access_size) < length) {
750+ if !( addr. saturating_add ( access_size) <= length) {
751751 return Err ( Trap :: MemoryOutOfBounds ) ;
752752 }
753753
Original file line number Diff line number Diff line change 1+ ;; ! threads = true
2+
3+ (module
4+ (memory (export " mem" ) 1 1 shared)
5+ (func (export " notify_last" ) (result i32 )
6+ (memory.atomic.notify (i32.const 65532 ) (i32.const 0 ))
7+ )
8+ (func (export " wait_last32" ) (result i32 )
9+ (memory.atomic.wait32 (i32.const 65532 ) (i32.const 0 ) (i64.const 0 ))
10+ )
11+ (func (export " wait_last64" ) (result i32 )
12+ (memory.atomic.wait64 (i32.const 65528 ) (i64.const 0 ) (i64.const 0 ))
13+ )
14+ )
15+
16+ (assert_return (invoke " notify_last" ) (i32.const 0 ))
17+ (assert_return (invoke " wait_last32" ) (i32.const 2 ))
18+ (assert_return (invoke " wait_last64" ) (i32.const 2 ))
You can’t perform that action at this time.
0 commit comments