Ryan Macnak
bed12669b8
gen_snapshot: When copying an error across isolates, remember to turn it back into an error.
...
Fixes flutter/flutter#7993 .
R=asiva@google.com
Review-Url: https://codereview.chromium.org/2687023002 .
2017-02-09 13:58:14 -08:00
Zachary Anderson
a4c42824ed
[dart:io] Add new functions to file_unsupported.cc.
...
Review-Url: https://codereview.chromium.org/2685153003 .
2017-02-09 09:58:30 -08:00
Zachary Anderson
3f5458cdcb
[dart:io] Adds functions to set file access and modification time
...
fixes #27877
R=asiva@google.com , floitsch@google.com
Review-Url: https://codereview.chromium.org/2681683005 .
2017-02-09 09:45:25 -08:00
Zachary Anderson
3cb96e98a8
[Fuchsia] Cleanup process launching for updated launchpad API
...
R=rmacnak@google.com
Review-Url: https://codereview.chromium.org/2681003004 .
2017-02-09 09:26:00 -08:00
Zachary Anderson
a7f7343259
[dart:io] A small boringssl cleanup from davidben@
...
R=rmacnak@google.com
Review-Url: https://codereview.chromium.org/2683703004 .
2017-02-08 12:25:55 -08:00
Zachary Anderson
b0749b1e60
[dart:io] Extract better error messages from boringssl.
...
R=rmacnak@google.com
Review-Url: https://codereview.chromium.org/2680513004 .
2017-02-07 07:45:21 -08:00
Jonas Termansen
a8b5498333
Fix peer addresses being reported raw rather than the actual address byte.
...
The struct sockaddr containing the remote address was being reported
rather than the actual sin_addr / sin6_addr fields. Use the ToTypedData
utility function to return the real address bytes as a dart list. Before
this fix all remote addresses would be reported (on Linux) as 2.0.x.y where
2.0 means IPv4 and x.y are the remote port in big endian, i.e. the first
four bytes of struct sockaddr.
R=rmacnak@google.com
BUG=
Review-Url: https://codereview.chromium.org/2665973003 .
2017-02-06 13:48:53 +01:00
John McCutchan
7a20e49a38
Change the DevFS base path
...
- [x] Append the file system name as a child directory. This gives a common
suffix for source paths.
BUG=
R=turnidge@google.com
Review-Url: https://codereview.chromium.org/2669223003 .
2017-02-02 12:58:21 -08:00
Ben Konyi
ed4bf4f2e0
Removed instances of fprintf in run_vm_tests and replaced them with OS::Print/PrintErr.
...
BUG=
R=johnmccutchan@google.com
Review-Url: https://codereview.chromium.org/2675553002 .
2017-02-02 09:43:06 -08:00
Florian Schneider
15a4d5d6d1
Windows: Link library sources into gen_snapshot/dart_bootstrap
...
This allows gen_snapshot and dart_bootstrap to run without having
a full SDK snapshot around.
The generated cc file looks like:
static const char source_array_1[] = {
'\x2f', '\x2f', '\x20', '\x43', '\x6f', ...
};
static const char source_array_2[] = {
'\x2f', '\x2f', '\x20', '\x43', '\x6f', ...
};
...
const char* dart::Bootstrap::core_source_paths_[] = {
"dart:core",
"/path/to/sdk/lib/core/core.dart",
source_array_1,
"annotations.dart",
"/path/to/sdk/lib/core/annotations.dart",
source_array_2,
...
R=asiva@google.com
Review-Url: https://codereview.chromium.org/2668353004 .
2017-02-01 15:55:59 -08:00
Siva Annamalai
b25d59ebb4
Land https://codereview.chromium.org/2662393002 for Jason.
...
R=jsimmons@google.com
Review-Url: https://codereview.chromium.org/2667183002 .
2017-02-01 10:38:21 -08:00
Kevin Millikin
1b3b85690f
Do not try to read vm-service and kernel-service
...
The VM service isolate and the Kernel service isolate are given script
URIs that are respectively "vm-service" and "kernel-service". We
should not try to treat these as binary files. Normally they just
don't exist, but if they happen to exist we should not read them.
BUG=
R=vegorov@google.com
Review-Url: https://codereview.chromium.org/2662213004 .
2017-02-01 12:59:02 +01:00
Ben Konyi
f2fd150ea0
Added new type of unit test, RAW_UNIT_TEST_CASE, which is used for tests that can be flaky if run while the VM is alive. Tests created using the RAW_UNIT_TEST_CASE macro will run after the VM has shutdown to avoid having any worker threads contaminating the test results.
...
BUG=
R=johnmccutchan@google.com
Review-Url: https://codereview.chromium.org/2666133002 .
2017-01-31 15:16:38 -08:00
Ryan Macnak
9eb216a495
Reapply "Create an app snapshot of the Dart front end."
...
Skip training on Windows, issue #28532 .
R=hausner@google.com
Review-Url: https://codereview.chromium.org/2665753002 .
2017-01-31 09:47:51 -08:00
Vyacheslav Egorov
9bae50bf47
VM: [Kernel] Revert changes to the native ports that introduced peers.
...
The problem with these changes was that closed ports still continue to receive
messages and as a result we start using dead peer objects.
Fixing that would require more intrusive changes into message handler implementation - so instead we are reverting the changes and restoring manual PORT -> PEER mapping.
BUG=
R=erikcorry@google.com
Review-Url: https://codereview.chromium.org/2666063002 .
2017-01-31 10:30:15 +01:00
Florian Schneider
5c75e37ae4
Fix potential unprotected use of handle in Windows event handler.
...
The lock should be held across the use of handle_.
Attempt to resolve #28523 .
R=rmacnak@google.com
Review-Url: https://codereview.chromium.org/2664073002 .
2017-01-30 18:18:09 -08:00
Ryan Macnak
dfd471eea2
Make the segfault handler attempt to symbolize Dart frames.
...
R=fschneider@google.com
Review-Url: https://codereview.chromium.org/2668443004 .
2017-01-30 16:38:50 -08:00
Vyacheslav Egorov
43a0500e37
VM: [Kernel] Fix bootstraping when Kernel isolate is used.
...
We must bootstrap from Kernel instead of Source when running with --dfe
BUG=
R=asiva@google.com , kustermann@google.com
Review-Url: https://codereview.chromium.org/2651633002 .
2017-01-30 20:52:59 +01:00
Ben Konyi
f679b3c3e5
Reintroducing MallocHooks changes with fix for hooks being called when in execvpe after a fork while the MallocHooks lock is held by a thread that may no longer exist.
...
BUG=
R=zra@google.com
Review-Url: https://codereview.chromium.org/2647283004 .
2017-01-30 09:55:20 -08:00
Ryan Macnak
728f460798
Revert "Create an app snapshot of the Dart front end."
...
This reverts commit 8c7111c967 .
This reverts commit 27c8e59d2e .
Review-Url: https://codereview.chromium.org/2657123002 .
2017-01-26 17:42:25 -08:00
Ryan Macnak
8c7111c967
Create an app snapshot of the Dart front end.
...
R=asiva@google.com , hausner@google.com , zra@google.com
Review-Url: https://codereview.chromium.org/2655173002 .
2017-01-26 16:28:59 -08:00
Zachary Anderson
0c3d73967d
VM eventhandler: Update epoll/kqueue even if the only event is an error
...
Otherwise, we may try to add an fd to epoll/kqueue when it is already
there.
Also avoid sending multiple notifications on an error.
related #24417
R=fschneider@google.com
Review-Url: https://codereview.chromium.org/2655893002 .
2017-01-25 13:50:00 -08:00
Florian Schneider
c1e4e8ef72
Fix Windows debug assertion when cancelling pending i/o
...
When no pending i/o requests are found, CancelIoEx returns ERROR_NOT_FOUND.
This is ok, since there is nothing else to do before closing the handle.
Related to #22940 .
TBR=zra@google.com
Review-Url: https://codereview.chromium.org/2651033004 .
2017-01-24 17:33:51 -08:00
Florian Schneider
2e1eeaf446
Cancel pending i/o when closing stdin on Windows
...
When cancelling a subscription to stdin, there may be pending I/O operation
that need to be explicitly cancelled before closing the stdin handle.
Otherwise the program would sit waiting for input (until CR is pressed).
Fixes dart-lang/pub#1502
Fixes #22940
R=zra@google.com
Review-Url: https://codereview.chromium.org/2650063003 .
2017-01-24 14:47:39 -08:00
Martin Kustermann
3f0ea0f50e
VM: Fix asan memory leak in some standalone tests
...
Fixes #28350
R=vegorov@google.com
Review-Url: https://codereview.chromium.org/2653583002 .
2017-01-23 19:45:28 +01:00
Ryan Macnak
b46af1e75f
Refactor snapshots pieces to include a section for loading instructions into the heap of a regular isolate.
...
Progress toward allowing each isolate to load a different snapshot.
R=asiva@google.com
Review-Url: https://codereview.chromium.org/2622053002 .
2017-01-23 10:25:02 -08:00
Zachary Anderson
e2220c3ea8
VM eventhandler: Read "old" event mask before it can be modified.
...
related #24417
R=johnmccutchan@google.com , kustermann@google.com
Review-Url: https://codereview.chromium.org/2635253002 .
2017-01-23 08:54:52 -08:00
Zach Anderson
7730809f36
Revert "Reintroducing MallocHooks changes with fix for infinite loop in MallocHooks on Platform::Exit."
...
This reverts commit 7bf5d87017 .
The lock introduced by this change in MallocHooksState is held across
a fork(), which causes deadlock in the child when execvpe() fails and
tries to acquire the lock when freeing memory.
Review-Url: https://codereview.chromium.org/2647793005 .
2017-01-20 23:52:31 -08:00
Ben Konyi
7bf5d87017
Reintroducing MallocHooks changes with fix for infinite loop in MallocHooks on Platform::Exit.
...
BUG=
R=zra@google.com
Review-Url: https://codereview.chromium.org/2643303003 .
2017-01-20 15:26:58 -08:00
Zachary Anderson
17fa9d47b2
GN: Only use -fPIC where needed
...
R=hausner@google.com
Review-Url: https://codereview.chromium.org/2642283003 .
2017-01-20 13:40:19 -08:00
Ben Konyi
c9a4374ed9
Revert "Implemented basic heap memory allocation tracking in MallocHooks using hooks registered with tcmalloc. Also updated BUILD.gn files to account for include paths within the tcmalloc project."
...
This reverts commit 5290052550 .
Revert "Fixed segfault in Remove method."
This reverts commit 203f1ba222 .
BUG=
TBR=zra@google.com
Review-Url: https://codereview.chromium.org/2647763003 .
2017-01-19 15:17:29 -08:00
Ben Konyi
5290052550
Implemented basic heap memory allocation tracking in MallocHooks using hooks registered with tcmalloc. Also updated BUILD.gn files to account for include paths within the tcmalloc project.
...
Fixed build issues from original submission.
BUG=
R=zra@google.com
Review-Url: https://codereview.chromium.org/2623613003 .
Review-Url: https://codereview.chromium.org/2644903003 .
2017-01-19 13:15:56 -08:00
Ryan Macnak
ce91f600ae
Only look for an app snapshot embedded in a dynamic library in the AOT runtime.
...
This mode is only intended for simulating iOS for testing. User-facing app snapshots only use regular files.
Avoids an error message on Fuchsia.
R=zra@google.com
Review-Url: https://codereview.chromium.org/2646733004 .
2017-01-19 12:59:54 -08:00
Ben Konyi
10686766cd
Revert "Implemented basic heap memory allocation tracking in MallocHooks using hooks registered with tcmalloc. Also updated BUILD.gn files to account for include paths within the tcmalloc project."
...
This reverts commit bcd7ba1056 .
TBR=zra@google.com
BUG=
Review-Url: https://codereview.chromium.org/2645973002 .
2017-01-19 12:14:19 -08:00
Ben Konyi
bcd7ba1056
Implemented basic heap memory allocation tracking in MallocHooks using hooks registered with tcmalloc. Also updated BUILD.gn files to account for include paths within the tcmalloc project.
...
BUG=
R=zra@google.com
Review-Url: https://codereview.chromium.org/2623613003 .
2017-01-19 12:09:07 -08:00
Zachary Anderson
306b0ec249
Fuchsia: Build an OS image that includes Dart's test suite.
...
Guarded by a GN argument, this CL builds a Fuchsia OS image
that includes Dart tree, including the test suite, packages,
test harness, and sufficient build output to run through the
test suite.
R=asiva@google.com
Review-Url: https://codereview.chromium.org/2547013003 .
2017-01-19 10:11:27 -08:00
Ryan Macnak
26a364f998
Support spawnUri in app snapshots.
...
- Don't mark core_isolate_snapshot_buffer as a const pointer.
- Update app snapshots without code to not rewrite the VM isolate snapshot, as already done by app snapshots with code.
Fixes #28368
R=asiva@google.com
Review-Url: https://codereview.chromium.org/2637193002 .
2017-01-17 15:59:41 -08:00
Ryan Macnak
12a3699301
Revert "Support spawnUri in app snapshots."
...
Failures on IA32.
This reverts commit c6ecfe1746 .
Review-Url: https://codereview.chromium.org/2631893002 .
2017-01-13 15:52:36 -08:00
Ryan Macnak
c6ecfe1746
Support spawnUri in app snapshots.
...
Don't mark core_isolate_snapshot_buffer as a const pointer.
Fixes #28368
R=asiva@google.com
Review-Url: https://codereview.chromium.org/2623423007 .
2017-01-13 15:18:27 -08:00
Zachary Anderson
6f9dcaff9d
Fuchsia: Disable service origin check. Bind service to all interfaces.
...
R=asiva@google.com
Review-Url: https://codereview.chromium.org/2626043006 .
2017-01-13 12:27:17 -08:00
Ryan Macnak
f89056f6cd
Revert "Support spawnUri in app snapshots."
...
This reverts commit 593d4504b0 .
This reverts commit 113aa64b98 .
This reverts commit 422afa2ead .
Review-Url: https://codereview.chromium.org/2633543003 .
2017-01-13 11:02:44 -08:00
Ryan Macnak
422afa2ead
Explicitly mark empty snapshots as extern.
...
TBR=asiva@google.com
Review-Url: https://codereview.chromium.org/2631763002 .
2017-01-13 10:59:08 -08:00
Ryan Macnak
113aa64b98
Windows apparently has stricter linkage rules.
...
TBR=asiva@google.com
Review-Url: https://codereview.chromium.org/2632553003 .
2017-01-13 10:51:51 -08:00
Ryan Macnak
593d4504b0
Support spawnUri in app snapshots.
...
Fixes #28368
R=asiva@google.com
Review-Url: https://codereview.chromium.org/2628283002 .
2017-01-13 10:37:51 -08:00
Zachary Anderson
deb2181067
Don't clobber SocketError's OSError on failed write and send.
...
related #25342
R=asiva@google.com
Review-Url: https://codereview.chromium.org/2632543002 .
2017-01-12 15:51:45 -08:00
Ryan Macnak
f51d1b229c
Cleanup embedder API functions for app snapshots.
...
- Rename functions to make correspondence between JIT and AOT app snapshot clearer.
- Update documentation on assembly output of AOT snapshots.
- Remove old Dart_PrecompileJIT.
R=asiva@google.com
Review-Url: https://codereview.chromium.org/2611343002 .
2017-01-12 09:36:22 -08:00
Zachary Anderson
c7d2f8276d
Fuchsia: Fix deprecated jobs call
...
Review-Url: https://codereview.chromium.org/2628213002 .
2017-01-12 08:44:04 -08:00
Martin Kustermann
5dc73cacd2
VM: Avoid running atexit() handlers during exit() of a failed subprocess spawn
...
Somtimes execve() fails and then we fall back to exit(1) in the fork()ed but not
exeve()ed subprocess.
One of the issues is e.g. that we don't want to run LSAN in the fork()ed but not
execve()ed subprocess, the results will be bogus (plus the output of
LSAN is not read on the other side (i.e. the unix pipe is not drained) which
blocks the subprocess indefinitely).
R=vegorov@google.com
Review-Url: https://codereview.chromium.org/2632483002 .
2017-01-12 14:20:34 +01:00
Florian Schneider
bef4967ea1
Remove dart_noopt and related parts from the VM.
...
dart_noopt is not needed anymore because we have testing
and builbot integration of the real precompilation pipeline in place now.
Fixes #24569
Fixes #25726
Fixes #25845
R=rmacnak@google.com
Review-Url: https://codereview.chromium.org/2624393002 .
2017-01-11 16:55:55 -08:00
Zachary Anderson
9509bd4443
Limit the number of outstanding file reads in the VM loader
...
related https://github.com/dart-lang/test/issues/373
R=johnmccutchan@google.com
Review-Url: https://codereview.chromium.org/2626093003 .
2017-01-11 15:33:07 -08:00