Revert "Reland "[vm] Remove warnings about non-standard stack traces.""
This reverts commit6651c29779. Reason for revert: breaks google3 (b/236928633) Original change's description: > Reland "[vm] Remove warnings about non-standard stack traces." > > This is a reland of commitcc9d14d822> > TEST=vm/dart{,_2}/causal_stacks/async_throws_stack_lazy_non_symbolic_test > > Original change's description: > > [vm] Remove warnings about non-standard stack traces. > > > > The language team has clarified in > > https://github.com/dart-lang/language/issues/1212 that the content of > > stack traces is not specified in a way that is violated by either > > obfuscation or non-symbolic stack traces. Thus, we remove the warnings > > about supposedly standard-violating stack traces. > > > > TEST=No change in actual functionality, so tested manually. > > > > Bug: https://github.com/dart-lang/sdk/issues/43388 > > Change-Id: I2c7ac44cf2f9afafa85d902b2783e1173e727264 > > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/249185 > > Commit-Queue: Tess Strickland <sstrickl@google.com> > > Reviewed-by: Daco Harkes <dacoharkes@google.com> > > Reviewed-by: Martin Kustermann <kustermann@google.com> > > Bug: https://github.com/dart-lang/sdk/issues/43388 > Change-Id: Ifa7915b4ba21cca592ed5645cd9ad6cda1575f12 > Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-dwarf-linux-product-x64-try,vm-kernel-precomp-linux-debug-x64-try,vm-kernel-precomp-linux-product-x64-try,vm-kernel-precomp-nnbd-linux-release-x64-try > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/249192 > Commit-Queue: Tess Strickland <sstrickl@google.com> > Reviewed-by: Martin Kustermann <kustermann@google.com> > Reviewed-by: Daco Harkes <dacoharkes@google.com> TBR=kustermann@google.com,dacoharkes@google.com,sstrickl@google.com Change-Id: I65f3d84caee3ec9ac30f0ce058104bb24ef6ea11 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: https://github.com/dart-lang/sdk/issues/43388 Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-dwarf-linux-product-x64-try,vm-kernel-precomp-linux-debug-x64-try,vm-kernel-precomp-linux-product-x64-try,vm-kernel-precomp-nnbd-linux-release-x64-try Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/249580 Commit-Queue: Emmanuel Pellereau <emmanuelp@google.com> Reviewed-by: Martin Kustermann <kustermann@google.com> Reviewed-by: Emmanuel Pellereau <emmanuelp@google.com>
This commit is contained in:
committed by
Commit Bot
parent
4d750a862d
commit
bb104f07fc
@@ -205,26 +205,21 @@ Future<void> assertStack(List<String> expects, StackTrace stackTrace,
|
||||
|
||||
// Use the DWARF stack decoder if we're running in --dwarf-stack-traces mode
|
||||
// and in precompiled mode (otherwise --dwarf-stack-traces has no effect).
|
||||
bool usingDwarf = false;
|
||||
if (debugInfoFilename != null) {
|
||||
try {
|
||||
final dwarf = Dwarf.fromFile(debugInfoFilename)!;
|
||||
usingDwarf = true;
|
||||
frames = await Stream.fromIterable(original)
|
||||
.transform(DwarfStackTraceDecoder(dwarf))
|
||||
.where(_lineRE.hasMatch)
|
||||
.toList();
|
||||
} on FileSystemException {
|
||||
// We're not running in precompiled mode, so the file doesn't exist and
|
||||
// we can continue normally.
|
||||
}
|
||||
final decodeTrace = frames.first.startsWith('Warning:');
|
||||
if (decodeTrace) {
|
||||
Expect.isNotNull(debugInfoFilename);
|
||||
final dwarf = Dwarf.fromFile(debugInfoFilename!)!;
|
||||
frames = await Stream.fromIterable(original)
|
||||
.transform(DwarfStackTraceDecoder(dwarf))
|
||||
.where(_lineRE.hasMatch)
|
||||
.toList();
|
||||
}
|
||||
|
||||
void printFrameInformation() {
|
||||
print('RegExps for expected stack:');
|
||||
expects.forEach((s) => print('"${s}"'));
|
||||
print('');
|
||||
if (usingDwarf) {
|
||||
if (decodeTrace) {
|
||||
print('Non-symbolic actual stack:');
|
||||
original.forEach(print);
|
||||
print('');
|
||||
|
||||
@@ -207,26 +207,21 @@ Future<void> assertStack(List<String> expects, StackTrace stackTrace,
|
||||
|
||||
// Use the DWARF stack decoder if we're running in --dwarf-stack-traces mode
|
||||
// and in precompiled mode (otherwise --dwarf-stack-traces has no effect).
|
||||
bool usingDwarf = false;
|
||||
if (debugInfoFilename != null) {
|
||||
try {
|
||||
final dwarf = Dwarf.fromFile(debugInfoFilename);
|
||||
usingDwarf = true;
|
||||
frames = await Stream.fromIterable(original)
|
||||
.transform(DwarfStackTraceDecoder(dwarf))
|
||||
.where(_lineRE.hasMatch)
|
||||
.toList();
|
||||
} on FileSystemException {
|
||||
// We're not running in precompiled mode, so the file doesn't exist and
|
||||
// we can continue normally.
|
||||
}
|
||||
final decodeTrace = frames.first.startsWith('Warning:');
|
||||
if (decodeTrace) {
|
||||
Expect.isNotNull(debugInfoFilename);
|
||||
final dwarf = Dwarf.fromFile(debugInfoFilename);
|
||||
frames = await Stream.fromIterable(original)
|
||||
.transform(DwarfStackTraceDecoder(dwarf))
|
||||
.where(_lineRE.hasMatch)
|
||||
.toList();
|
||||
}
|
||||
|
||||
void printFrameInformation() {
|
||||
print('RegExps for expected stack:');
|
||||
expects.forEach((s) => print('"${s}"'));
|
||||
print('');
|
||||
if (usingDwarf) {
|
||||
if (decodeTrace) {
|
||||
print('Non-symbolic actual stack:');
|
||||
original.forEach(print);
|
||||
print('');
|
||||
|
||||
@@ -1739,6 +1739,13 @@ Isolate::Isolate(IsolateGroup* isolate_group,
|
||||
// how the vm_tag (kEmbedderTagId) can be set, these tags need to
|
||||
// move to the OSThread structure.
|
||||
set_user_tag(UserTags::kDefaultUserTag);
|
||||
|
||||
if (group()->obfuscate()) {
|
||||
OS::PrintErr(
|
||||
"Warning: This VM has been configured to obfuscate symbol information "
|
||||
"which violates the Dart standard.\n"
|
||||
" See dartbug.com/30524 for more information.\n");
|
||||
}
|
||||
}
|
||||
|
||||
#undef REUSABLE_HANDLE_SCOPE_INIT
|
||||
|
||||
@@ -25878,6 +25878,12 @@ const char* StackTrace::ToCString() const {
|
||||
isolate_instructions_image.instructions_relocated_address();
|
||||
auto const vm_relocated_address =
|
||||
vm_instructions_image.instructions_relocated_address();
|
||||
// The Dart standard requires the output of StackTrace.toString to include
|
||||
// all pending activations with precise source locations (i.e., to expand
|
||||
// inlined frames and provide line and column numbers).
|
||||
buffer.Printf(
|
||||
"Warning: This VM has been configured to produce stack traces "
|
||||
"that violate the Dart standard.\n");
|
||||
// This prologue imitates Android's debuggerd to make it possible to paste
|
||||
// the stack trace into ndk-stack.
|
||||
buffer.Printf(
|
||||
|
||||
Reference in New Issue
Block a user