Skip to content

Commit 36da75d

Browse files
rmacnak-googleCommit Queue
authored andcommitted
[vm, compiler] Fix mismatch between ARM's StoreIndexedInstr::MakeLocationSummary and EmitNativeCode.
TEST=dartfuzz Bug: #56948 Change-Id: I7241071df2aedb34a88817896005eb0fdff674eb Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/391487 Reviewed-by: Alexander Markov <[email protected]> Commit-Queue: Ryan Macnak <[email protected]>
1 parent 83b0a89 commit 36da75d

File tree

2 files changed

+27
-1
lines changed

2 files changed

+27
-1
lines changed
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file
2+
// for details. All rights reserved. Use of this source code is governed by a
3+
// BSD-style license that can be found in the LICENSE file.
4+
5+
// The Dart Project Fuzz Tester (1.101).
6+
// Program generated as:
7+
// dart dartfuzz.dart --seed 2618914219 --no-fp --no-ffi --flat
8+
// @dart=2.14
9+
10+
import 'dart:typed_data';
11+
import 'dart:io';
12+
13+
@pragma("vm:never-inline")
14+
foo() {
15+
Int8List(28).fillRange(-19, 25, 9223372034707292160);
16+
}
17+
18+
main() {
19+
try {
20+
foo();
21+
} catch (e, st) {
22+
print('foo throws');
23+
}
24+
25+
sleep(Duration(seconds: 3)); // Let background compiler catch up.
26+
}

runtime/vm/compiler/backend/il_arm.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2384,7 +2384,7 @@ LocationSummary* StoreIndexedInstr::MakeLocationSummary(Zone* zone,
23842384
locs->set_in(2, Location::Pair(Location::RequiresRegister(),
23852385
Location::RequiresRegister()));
23862386
} else if (rep == kUnboxedInt8 || rep == kUnboxedUint8) {
2387-
locs->set_in(2, LocationRegisterOrConstant(value()));
2387+
locs->set_in(2, LocationRegisterOrSmiConstant(value()));
23882388
} else {
23892389
locs->set_in(2, Location::RequiresRegister());
23902390
}

0 commit comments

Comments
 (0)