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: whitespace

Bug: 12114500
Change-Id: I989c83291d0c42d4cad63f24a3e98a93e231c9d3
Remove old fork-and-specialize API

As promised, this is the cleanup patch-set which removes the
old native "fork and specialize" API, which has been replaced
by a slightly-enhanced one which can close the Zygote socket
descriptors in the Zygote child.

Change-Id: I33f504afd242e268863270139b4e421d4b0728f2
vm: Enable fast multiply on perf builds too

Change-Id: I74d152ea9cfe5b15daa9a8353ca27d8afa7474d2
setting RLIMIT to INFINITY.

This is to generate coredumps for processes spawned by zygote

Change-Id: I2dbac76fbcaa7be3845ba5e12ad064548a25e2e3
Dalvik: Add sdiv support in the interpreter

This patch adds hardware divide support in the interpreter side of
dalvik. This operation is supported on new armv7 cpus such as A15 or A7.

Opcodes added:
    OP_DIV_INT
    OP_DIV_INT_2ADDR
    OP_DIV_INT_LIT16
    OP_DIV_INT_LIT8
    OP_REM_INT
    OP_REM_INT_2ADDR
    OP_REM_INT_LIT16
    OP_REM_INT_LIT8

Change-Id: Ib1ec5856d957feadd90807fe53ec34cc0e1fd4a2
Signed-off-by: Serban Constantinescu <serban.constantinescu@arm.com>
Dalvik: Add hardware support for OP_LONG_TO_DOUBLE in the interpreter

The following patch adds hardware vfp support for OP_LONG_TO_DOUBLE
in the interpreter. Previously this opcode was implemented using one of
gcc's builtin helpers.

Change-Id: I7713aa03c0b0bed8df592710dd50ab3d13d4bd9b
Signed-off-by: Serban Constantinescu <serban.constantinescu@arm.com>
Don't implicitly cast NULL to a bool

The code is wrong and causes an error when building with clang 3.4
(-Werror,-Wnull-conversion)

Change-Id: If03aa782fa25337802ff906a0d06071fbda93e26
Signed-off-by: Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org>
Initialize callTgt variable

This silcences a clang build failure:
dalvik/vm/compiler/codegen/arm/armv7-a-neon/../CodegenDriver.cpp:904:41:
error: variable 'callTgt' is uninitialized when used here
[-Werror,-Wuninitialized]
        LOAD_FUNC_ADDR(cUnit, r2, (int) callTgt);
                                        ^~~~~~~

Change-Id: Ic5b3bb492f19b842743bf7d6214c89301ff524e7
Signed-off-by: Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org>
Remove code related to extended-opcode.

- This support was removed one year ago.

(cherry-pick from commit 18b65cbb3ec6634618bd3240a692507432e634b5)

Change-Id: I1154e518dc8a15220f2fcb163056570030492bb0
Change exception message for ArrayStoreException.

The exception message is tested in SystemTest. I'm not sure
what's worse: Changing the dalvik message or changing the test
to be happy with both messages.

(I assume the art message is the one we chose because it's more
recent.)

Change-Id: Ia68641a05f992ab5a949add865fb3f7bb46e61be
Fix dx test 034.

- Test 034 requires that a dex file is dumped in a human readable form
even if the dex file does not contain ClassDef.
Consequently, the command line behavior is modified to satisfy this requirement.

(cherry-pick from commit 64f4aad1e6ef58b29f860b59512ca1a676ac6eb8)

Change-Id: Id64b563745db2b22ec98fba9be25413192c07719
Use MAP_FIXED in remapNewHeap

The heap address must not change when it is remapped

Change-Id: Ia44f178932e2afe8de3d4739e7085caae8568885
Signed-off-by: Pete Delaney <piet.delaney@imgtec.com>
Signed-off-by: Chris Dearman <chris.dearman@imgtec.com>