sdk
sdk copied to clipboard
add_field_and_remove_subclass fails heap validation in 64-bit
FAILED: none-dartino_tests release_x64 dartino_tests/incremental/experimental/add_field_and_remove_subclass
Expected: Pass
Actual: Fail
CommandOutput[dartino_test]:
stdout:
Running '/mnt/data/b/build/slave/dartino-linux-release-x86/build/sdk/out/ReleaseX64/dartino-vm -Xvalidate-heaps'
Test 'add_field_and_remove_subclass'
Program version 1 #add_field_and_remove_subclass:
==> main.dart <==
1: // Regression test for what happens when a field is added at the same time a
2: // class is removed.
3: class A {
4: }
5:
6: class B extends A {
7: }
8:
9: main() {
10: new B();
11: }
Added breakpoint: id: '0' method: 'main' bytecode index: '0'
* 0: callMain @=> invokeMain(arguments);
1: entry @callMain(new _Arguments())
Program version 2 #add_field_and_remove_subclass:
==> main.dart <==
1: // Regression test for what happens when a field is added at the same time a
2: // class is removed.
3: class A {
4: var field;
5: }
6:
7:
8: main() {
9: new A();
10: }
Attempting to reuse library(org.dartlang.dartino.test-case:/main.dart).
New library synthesized.
Differences computed.
Looking at difference: Removed(class(B))
Removed class class(B).
Looking at difference: Modified(function(main) -> function(main))
Simple modification of function(main) detected
Looking at difference: Modified(class(A) -> class(A))
Simple modification of class(A) detected
Differences computed.
Looking at difference: Added(Instance of 'PartialFieldList')
Add field field(A#field) to class(A).
Reusing origin library(dart:core) (assumed read-only).
Reusing library(dart:dartino._system) (assumed read-only).
Reusing origin library(dart:_internal) (assumed read-only).
Reusing origin library(dart:collection) (assumed read-only).
Reusing origin library(dart:math) (assumed read-only).
Reusing library(dart:dartino) (assumed read-only).
Reusing origin library(dart:convert) (assumed read-only).
Reusing origin library(dart:async) (assumed read-only).
Reusing library(dart:dartino.os) (assumed read-only).
Reusing library(dart:dartino.ffi) (assumed read-only).
Reusing origin library(dart:typed_data) (assumed read-only).
VmCommandCode.PrepareForChanges()
VmCommandCode.RemoveFromMap(MapId.methods, 12)
VmCommandCode.RemoveFromMap(MapId.methods, 19)
VmCommandCode.PushNull()
VmCommandCode.PushNewFunction(arity: 0, literals: 1, bytecodes: [invoke static 0, pop, return null, method end 14], catchRanges: [])
VmCommandCode.PopToMap(mapId: MapId.methods, index: 32)
VmCommandCode.PushNull()
VmCommandCode.PushNewFunction(arity: 0, literals: 1, bytecodes: [load literal null, load local 0, allocate 0, return, method end 16], catchRanges: [])
VmCommandCode.PopToMap(mapId: MapId.methods, index: 33)
VmCommandCode.PushNewFunction(arity: 1, literals: 0, bytecodes: [return null, method end 2], catchRanges: [])
VmCommandCode.PopToMap(mapId: MapId.methods, index: 34)
VmCommandCode.PushFromMap(mapId: MapId.classes, index: 0)
VmCommandCode.PushNewInteger(value: 39939)
VmCommandCode.PushFromMap(mapId: MapId.methods, index: 9)
VmCommandCode.PushNewInteger(value: 40960)
VmCommandCode.PushFromMap(mapId: MapId.methods, index: 11)
VmCommandCode.PushNewInteger(value: 68609)
VmCommandCode.PushFromMap(mapId: MapId.methods, index: 23)
VmCommandCode.ChangeMethodTable(count: 3)
VmCommandCode.PushFromMap(mapId: MapId.classes, index: 33)
VmCommandCode.PushNewInteger(value: 79104)
VmCommandCode.PushFromMap(mapId: MapId.methods, index: 0)
VmCommandCode.PushNewInteger(value: 79361)
VmCommandCode.PushFromMap(mapId: MapId.methods, index: 2)
VmCommandCode.ChangeMethodTable(count: 2)
VmCommandCode.PushFromMap(mapId: MapId.classes, index: 34)
VmCommandCode.ChangeMethodTable(count: 0)
VmCommandCode.PushFromMap(mapId: MapId.classes, index: 33)
VmCommandCode.PushFromMap(mapId: MapId.classes, index: 0)
VmCommandCode.ChangeSuperClass()
VmCommandCode.PushFromMap(mapId: MapId.classes, index: 34)
VmCommandCode.PushFromMap(mapId: MapId.classes, index: 33)
VmCommandCode.ChangeSuperClass()
VmCommandCode.PushFromMap(mapId: MapId.methods, index: 32)
VmCommandCode.PushFromMap(mapId: MapId.methods, index: 33)
VmCommandCode.ChangeMethodLiteral(index: 0)
VmCommandCode.PushFromMap(mapId: MapId.methods, index: 33)
VmCommandCode.PushFromMap(mapId: MapId.classes, index: 33)
VmCommandCode.ChangeMethodLiteral(index: 0)
VmCommandCode.PushFromMap(mapId: MapId.classes, index: 33)
VmCommandCode.PushNewInteger(value: 0)
VmCommandCode.PushNull()
VmCommandCode.PushNewArray(length: 2)
VmCommandCode.ChangeSchemas(count: 1, delta: 1)
VmCommandCode.PushFromMap(mapId: MapId.classes, index: 34)
VmCommandCode.PushNewInteger(value: 0)
VmCommandCode.PushNull()
VmCommandCode.PushNewArray(length: 2)
VmCommandCode.ChangeSchemas(count: 1, delta: 1)
VmCommandCode.PushFromMap(mapId: MapId.methods, index: 16)
VmCommandCode.PushFromMap(mapId: MapId.methods, index: 32)
VmCommandCode.ChangeMethodLiteral(index: 0)
VmCommandCode.CommitChanges(count: 10)
dartino_vm_stderr: Found pointer 0xfe6f1255001 which lies in neither of mutable_heap/program_heap.
dartino_vm_stderr: ../../src/vm/heap_validator.cc:37: error: Heap validation failed.
VM exited with exit code: -6.
stderr:
Bad state: Test has 3 problem(s). Details:
Problem #1:
SocketException: OS Error: Connection reset by peer, errno = 104, address = 127.0.0.1, port = 43896
null
Problem #2:
type 'ConnectionError' is not a subtype of type 'CommitChangesResult' of 'result'.
#0 DartinoVmTester.runDelta.<runDelta_async_body> (file:///mnt/data/b/build/slave/dartino-linux-release-x86/build/sdk/tests/dartino_compiler/incremental/dartino_vm_tester.dart)
#1 _asyncThenWrapperHelper.<anonymous closure> (dart:async-patch/async_patch.dart:27)
#2 _rootRunUnary (dart:async/zone.dart:902)
#3 _CustomZone.runUnary (dart:async/zone.dart:798)
#4 _Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:551)
#5 _Future._propagateToListeners (dart:async/future_impl.dart:637)
#6 _Future._complete (dart:async/future_impl.dart:414)
#7 _SyncCompleter.complete (dart:async/future_impl.dart:52)
#8 Session.applyDelta.<applyDelta_async_body> (package:dartino_compiler/vm_session.dart:259:5)
#9 _asyncThenWrapperHelper.<anonymous closure> (dart:async-patch/async_patch.dart:27)
#10 _rootRunUnary (dart:async/zone.dart:902)
#11 _CustomZone.runUnary (dart:async/zone.dart:798)
#12 _Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:551)
#13 _Future._propagateToListeners (dart:async/future_impl.dart:637)
#14 _Future._complete (dart:async/future_impl.dart:414)
#15 _SyncCompleter.complete (dart:async/future_impl.dart:52)
#16 DartinoVmSession.runCommands.<runCommands_async_body> (package:dartino_compiler/vm_session.dart:139:5)
#17 _asyncThenWrapperHelper.<anonymous closure> (dart:async-patch/async_patch.dart:27)
#18 _rootRunUnary (dart:async/zone.dart:902)
#19 _CustomZone.runUnary (dart:async/zone.dart:798)
#20 _Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:551)
#21 _Future._propagateToListeners (dart:async/future_impl.dart:637)
#22 _Future._complete (dart:async/future_impl.dart:414)
#23 _SyncCompleter.complete (dart:async/future_impl.dart:52)
#24 DartinoVmSession.readNextCommand.<readNextCommand_async_body> (package:dartino_compiler/vm_session.dart:172:7)
#25 _asyncThenWrapperHelper.<anonymous closure> (dart:async-patch/async_patch.dart:27)
#26 _rootRunUnary (dart:async/zone.dart:902)
#27 _CustomZone.runUnary (dart:async/zone.dart:798)
#28 _Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:551)
#29 _Future._propagateToListeners (dart:async/future_impl.dart:637)
#30 _Future._completeError (dart:async/future_impl.dart:432)
#31 _StreamIteratorImpl._onError (dart:async/stream_impl.dart:1065)
#32 _rootRunBinary (dart:async/zone.dart:914)
#33 _CustomZone.runBinary (dart:async/zone.dart:806)
#34 _CustomZone.runBinaryGuarded (dart:async/zone.dart:712)
#35 _BufferingStreamSubscription._sendError.sendError (dart:async/stream_impl.dart:358)
#36 _BufferingStreamSubscription._sendError (dart:async/stream_impl.dart:371)
#37 _DelayedError.perform (dart:async/stream_impl.dart:606)
#38 _StreamImplEvents.handleNext (dart:async/stream_impl.dart:711)
#39 _PendingEvents.schedule.<anonymous closure> (dart:async/stream_impl.dart:671)
#40 _rootRun (dart:async/zone.dart:891)
#41 _CustomZone.run (dart:async/zone.dart:790)
#42 _CustomZone.runGuarded (dart:async/zone.dart:696)
#43 _CustomZone.bindCallback.<anonymous closure> (dart:async/zone.dart:721)
#44 _rootRun (dart:async/zone.dart:895)
#45 _CustomZone.run (dart:async/zone.dart:790)
#46 _CustomZone.runGuarded (dart:async/zone.dart:696)
#47 _CustomZone.bindCallback.<anonymous closure> (dart:async/zone.dart:721)
#48 _microtaskLoop (dart:async/schedule_microtask.dart:41)
#49 _startMicrotaskLoop (dart:async/schedule_microtask.dart:50)
#50 _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:96)
#51 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:149)
Problem #3:
Unexpected stderr from dartino-vm:
Found pointer 0xfe6f1255001 which lies in neither of mutable_heap/program_heap.
../../src/vm/heap_validator.cc:37: error: Heap validation failed.
#0 TestSession.waitForCompletion.<waitForCompletion_async_body> (file:///mnt/data/b/build/slave/dartino-linux-release-x86/build/sdk/tests/dartino_compiler/incremental/dartino_vm_tester.dart:337:7)
#1 _asyncThenWrapperHelper.<anonymous closure> (dart:async-patch/async_patch.dart:27)
#2 _rootRunUnary (dart:async/zone.dart:902)
#3 _CustomZone.runUnary (dart:async/zone.dart:798)
#4 _Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:551)
#5 _Future._propagateToListeners (dart:async/future_impl.dart:637)
#6 _Future._addListener.<anonymous closure> (dart:async/future_impl.dart:293)
#7 _rootRun (dart:async/zone.dart:895)
#8 _CustomZone.run (dart:async/zone.dart:790)
#9 _CustomZone.runGuarded (dart:async/zone.dart:696)
#10 _CustomZone.bindCallback.<anonymous closure> (dart:async/zone.dart:721)
#11 _microtaskLoop (dart:async/schedule_microtask.dart:41)
#12 _startMicrotaskLoop (dart:async/schedule_microtask.dart:50)
#13 _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:96)
#14 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:149)
exitcode: 0
Command[dartino_test]: DartinoTestCommand(incremental/experimental/add_field_and_remove_subclass)
Took 0:00:01.079082
Short reproduction command (experimental):
python tools/test.py -mrelease -ax64 --kill-persistent-process=0 --run-gclient-hooks=0 --build-before-testing=0 -rdartino_tests -t60 dartino_tests/incremental/experimental/add_field_and_remove_subclass
@ErikCorryGoogle