Finish fixing Zygote descriptor leakage problem

In order to prevent Zygote descriptors from leaking into the child
environment, they should be closed by the forked-off child process
before the child switches to the application UID.  These changes close
the descriptors via dup2(), substituting a descriptor open to
/dev/null in their place; this allows the Zygote Java code to close
the FileDescriptor objects cleanly.

This is a multi-project change:	dalvik, art, libcore, frameworks/base,
and external/sepolicy are affected.  The CLs need to be approved
together, lest the build break or the software fail to boot.

Round 2: use proper type (jsize) for iteration variable;  whitespace.

Round 3: indentation.

Bug: 12114500
Change-Id: I31d25831b477b076d980c531d57773f9c8c83261
build non debugging

Change-Id: I396c21307ef283c3801925b35b2234e48934c9c8
Remove usage of LOCAL_BUILD_HOST_DEX

(cherry picked from commit cc8522f6b89e55a1c9abee181874d3ab29441466)

Change-Id: Ida3baa2acb5918557e52f083aad88b41a685da9e
Fix BUILD_DALVIK_HOST_JAVA_LIBRARY to BUILD_HOST_DALVIK_JAVA_LIBRARY

(cherry picked from commit d7997ebc2ae418d593fab83afe484f161f52b455)

Change-Id: Ibec6446b8e194e4feb92e18f4676088d201c7077
Fix Mir2Lir::AllocFreeTemp() to return -1 on failure.

Change-Id: I190de54de347fe3f4c9bcd07b2117ad91ea5c9a3
Fix dependencies to be on core-libart, not core

Change-Id: I002f4ab170146d48210655fbed44328a289873f5

Conflicts:
	runtime/dex_method_iterator_test.cc
Fix null argument handling during invoke from JDWP.

Fix a crash when passing null argument to a JDWP invoke.

Change-Id: I167f93f3a411f0de8458db3ba5bed3169d557ee9
Remove unused method in DEX-to-DEX.

Change-Id: Ice5f91b45a0ad85576475a613193f143fd76ad9f
Manage JDWP errors related to garbage collection.

Returns INVALID_OBJECT error in case of invalid object ID or null object ID in
commands ObjectReference.DisableCollection, ObjectReference.EnableCollection
and ObjectReference.IsCollected.

Note: JDWP specs do not state ObjectReference.EnableCollection must return any
error code. We choose to be more strict so these three commands all behave the
same.

Change-Id: I06fb75b75f7d33cf4d23e121d9541bfd70b778bb
Use dmb.

We don't support ARM processors that don't have dmb anyway.

Change-Id: I41b15a1592febcc0b33d93c291431d00692a2928
Add class to verifier's rejected list if superclass is erroneous.

This will prevent the compiler from trying to compile one of these
classes, which will fail because it has no GC map.

Bug: 12104117
Change-Id: I77ec77d30ee5dc92d7f4c594f1e8f1ce9b67855d
Make part of the elf_writer_test specific to the portable build.

Change-Id: Ic24d04b71a0267ed3a7c7fe4e7b167644b8c96e0
Cleanup thread pool tasks creation.

Removes unused vector when adding new ForAllClosure tasks to the thread pool.

Change-Id: Ie0c8067bc5cbfac45db04a6242bc98f89c3efc8d
Port "Retry mount() if it fails with EINTR" to ART

Porting https://android-review.googlesource.com/#/c/72742

Change-Id: I13ba58f2d3589ea61d1df3cd06023268151ce864

Conflicts:
	runtime/native/dalvik_system_Zygote.cc
Use the asm-generic ucontext.h for arm.

There is no ucontext.h in uapi kernel headers, so use the generic one. This
works with or without uapi kernel headers.

Bug: 11559337
Change-Id: Ia6d1dafc15ead99c802be3873dcf20f428650585

Conflicts:
	runtime/common_test.h
Fix build - style issues.

Change-Id: I40540dac2a51ef326e642116b5c64fb581c849f2

Conflicts:
	compiler/dex/quick/dex_file_method_inliner.cc
	compiler/dex/quick/dex_file_method_inliner.h

Conflicts:
	compiler/dex/quick/dex_file_method_inliner.cc
Fix build - test issues.

Fix compilation errors in tests.

Change-Id: Id2405edc2eec5bef9ebf5f241db03a0bb4a6b5a3

Conflicts:
	compiler/oat_test.cc
	runtime/common_test.h
Fix test-art setup.

Change-Id: I5762bd10d0bb8346541346b3d5711200a0208c4f

Conflicts:
	runtime/common_test.h
Generate devirtualization map only for native compilation.

Since devirtualization is only supported by the quick compiler, we do not need
to generate devirtualization map for non-compiled method.

Bug: 12171022
Change-Id: Ic7d6882396a05b70c4b8067bd14b7a339e0a93ab

Conflicts:
	compiler/dex/verified_methods_data.cc
Fix byte_cas to work on non-word aligned addresses

(cherry picked from commit 1279d12eb94b7664fc839d4ef7f30c7d6b20e603)

Change-Id: I307f65f20609bca8ec9c9f9a0ea4725c7ab8ad74