Skip to content

Commit

Permalink
[vm, compiler] Fix mismatch between ARM's StoreIndexedInstr::MakeLoca…
Browse files Browse the repository at this point in the history
…tionSummary and EmitNativeCode.

TEST=dartfuzz
Bug: #56948
Change-Id: I7241071df2aedb34a88817896005eb0fdff674eb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/391487
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
  • Loading branch information
rmacnak-google authored and Commit Queue committed Oct 28, 2024
1 parent 83b0a89 commit 36da75d
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
26 changes: 26 additions & 0 deletions runtime/tests/vm/dart/regress_56948_test.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

// The Dart Project Fuzz Tester (1.101).
// Program generated as:
// dart dartfuzz.dart --seed 2618914219 --no-fp --no-ffi --flat
// @dart=2.14

import 'dart:typed_data';
import 'dart:io';

@pragma("vm:never-inline")
foo() {
Int8List(28).fillRange(-19, 25, 9223372034707292160);
}

main() {
try {
foo();
} catch (e, st) {
print('foo throws');
}

sleep(Duration(seconds: 3)); // Let background compiler catch up.
}
2 changes: 1 addition & 1 deletion runtime/vm/compiler/backend/il_arm.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2384,7 +2384,7 @@ LocationSummary* StoreIndexedInstr::MakeLocationSummary(Zone* zone,
locs->set_in(2, Location::Pair(Location::RequiresRegister(),
Location::RequiresRegister()));
} else if (rep == kUnboxedInt8 || rep == kUnboxedUint8) {
locs->set_in(2, LocationRegisterOrConstant(value()));
locs->set_in(2, LocationRegisterOrSmiConstant(value()));
} else {
locs->set_in(2, Location::RequiresRegister());
}
Expand Down

0 comments on commit 36da75d

Please sign in to comment.