OSDN Git Service

android-x86/dalvik.git
14 years agoSet the debug interpreter entry point properly on the self-verification path.
Ben Cheng [Mon, 12 Oct 2009 20:46:55 +0000 (13:46 -0700)]
Set the debug interpreter entry point properly on the self-verification path.

Also fix the encoding for SFP/DFP register names to make self-verification
happy on FP benchmarks.

14 years agoam e652b123: Make sure res is NULL if getaddrinfo fails.
Lorenzo Colitti [Mon, 12 Oct 2009 18:35:56 +0000 (11:35 -0700)]
am e652b123: Make sure res is NULL if getaddrinfo fails.

Merge commit 'e652b123d2d65d40e5f51c0145cc453ea88631dc'

* commit 'e652b123d2d65d40e5f51c0145cc453ea88631dc':
  Make sure res is NULL if getaddrinfo fails.

14 years agoAdding a timeout for standard out as well as standard error.
Jesse Wilson [Sat, 10 Oct 2009 04:53:23 +0000 (21:53 -0700)]
Adding a timeout for standard out as well as standard error.

14 years agoMerge change I164613f2
Android (Google) Code Review [Sat, 10 Oct 2009 01:21:46 +0000 (21:21 -0400)]
Merge change I164613f2

* changes:
  Rewrite Support_Exec to support timeouts on waiting processes.

14 years agoRewrite Support_Exec to support timeouts on waiting processes.
Jesse Wilson [Sat, 10 Oct 2009 00:41:52 +0000 (17:41 -0700)]
Rewrite Support_Exec to support timeouts on waiting processes.

Also rewriting SupportExec to use ProcessBuilder rather
than Runtime.exec(). Changed callers to use the ProcessBuilder
directly rather than calling-through chained methods.

14 years agoMerge change Ic98d470a
Android (Google) Code Review [Fri, 9 Oct 2009 23:51:32 +0000 (19:51 -0400)]
Merge change Ic98d470a

* changes:
  Remove the intermediate representation in getNetworkInterfaces.

14 years agoMerge change I6239d93b
Android (Google) Code Review [Fri, 9 Oct 2009 22:47:36 +0000 (18:47 -0400)]
Merge change I6239d93b

* changes:
  Fix the docs for the no-arg Random() constructor to better reflect reality, and make the constructors more resilient with respect to subclassing by using System.identityHashCode() instead of Object.hashCode(), and also by not calling overridable methods.

14 years agoFix the docs for the no-arg Random() constructor to better reflect reality,
Dan Bornstein [Fri, 9 Oct 2009 20:09:34 +0000 (13:09 -0700)]
Fix the docs for the no-arg Random() constructor to better reflect reality,
and make the constructors more resilient with respect to subclassing by
using System.identityHashCode() instead of Object.hashCode(), and also by
not calling overridable methods.

Change-Id: I6239d93bb46876ef1c4a5e155a6dc1ac6fab4eae

14 years agoMerge change I0e98511f
Android (Google) Code Review [Fri, 9 Oct 2009 20:27:42 +0000 (16:27 -0400)]
Merge change I0e98511f

* changes:
  Do not initialize the JIT if it is not the designated execution mode.

14 years agoMerge change I98acebf9
Android (Google) Code Review [Fri, 9 Oct 2009 20:16:49 +0000 (16:16 -0400)]
Merge change I98acebf9

* changes:
  Disable SMALL_BUFFERS and CUTTHROUGH, as SSLSession test fails with these flags.

14 years agoDo not initialize the JIT if it is not the designated execution mode.
Ben Cheng [Fri, 9 Oct 2009 18:55:30 +0000 (11:55 -0700)]
Do not initialize the JIT if it is not the designated execution mode.

14 years agoMinor tweak for compatibility with BSD: Use MAP_ANON instead of MAP_ANONYMOUS.
Dan Bornstein [Thu, 8 Oct 2009 00:33:46 +0000 (17:33 -0700)]
Minor tweak for compatibility with BSD: Use MAP_ANON instead of MAP_ANONYMOUS.

The former is deprecated on Linux, but it is equivalent, and
MAP_ANONYMOUS isn't valid at all on BSD. (The alternative for BSD
compatibility is to use #ifdefs, but that seems gratuitously
heavyweight to me.)

Change-Id: I9c0b2cc78c4d7edc633487d5b0dde5b2f928247e

14 years agoMerge change I5ccdf0be
Android (Google) Code Review [Fri, 9 Oct 2009 16:49:15 +0000 (12:49 -0400)]
Merge change I5ccdf0be

* changes:
  Fix for "Compiler thread shutdown should switch out of VMWAIT"

14 years agoDisable SMALL_BUFFERS and CUTTHROUGH, as SSLSession test fails with these flags.
Nagendra Modadugu [Fri, 9 Oct 2009 01:34:48 +0000 (18:34 -0700)]
Disable SMALL_BUFFERS and CUTTHROUGH, as SSLSession test fails with these flags.

14 years agoSquashed commit of the following:
Elliott Hughes [Thu, 8 Oct 2009 23:56:37 +0000 (16:56 -0700)]
Squashed commit of the following:

commit 07d78447c89a11265bf909ab6bcc315c1a784281
Author: Elliott Hughes <enh@google.com>
Date:   Thu Oct 8 16:38:26 2009 -0700

    text_dalvik

commit c390506ce060c705b6c1b04fb1e737617de1bd8a
Author: Elliott Hughes <enh@google.com>
Date:   Thu Oct 8 16:38:22 2009 -0700

    text_802921

14 years agoFix for "Compiler thread shutdown should switch out of VMWAIT"
Ben Cheng [Thu, 8 Oct 2009 23:09:49 +0000 (16:09 -0700)]
Fix for "Compiler thread shutdown should switch out of VMWAIT"

14 years agoTools to push code back upstream.
Jesse Wilson [Thu, 8 Oct 2009 07:25:33 +0000 (00:25 -0700)]
Tools to push code back upstream.

14 years agoMerge change I685130ae
Android (Google) Code Review [Thu, 8 Oct 2009 18:29:37 +0000 (14:29 -0400)]
Merge change I685130ae

* changes:
  JNI Delete* and Release* _are_ allowed while an exception is pending.

14 years agoMerge change I9c147b84
Android (Google) Code Review [Thu, 8 Oct 2009 17:50:00 +0000 (13:50 -0400)]
Merge change I9c147b84

* changes:
  Fix various bugs found when debugger is attached to the VM.

14 years agoFixing the JUnit runner to output Ant-compatible XML.
Jesse Wilson [Thu, 8 Oct 2009 00:20:15 +0000 (17:20 -0700)]
Fixing the JUnit runner to output Ant-compatible XML.

We can use this with our continuous build to track test
failure changes over time.

14 years agoFix various bugs found when debugger is attached to the VM.
Ben Cheng [Wed, 7 Oct 2009 23:41:46 +0000 (16:41 -0700)]
Fix various bugs found when debugger is attached to the VM.

See b/2161257 for details.

14 years agoJNI Delete* and Release* _are_ allowed while an exception is pending.
Elliott Hughes [Wed, 7 Oct 2009 23:33:23 +0000 (16:33 -0700)]
JNI Delete* and Release* _are_ allowed while an exception is pending.

See "Exceptions" in our own documentation:
http://android.git.kernel.org/?p=platform/dalvik.git;a=blob_plain;f=docs/jni-tips.html;hb=HEAD

This is also true of the RI, though the spec sometimes implies otherwise.
Here's the canonical reference:
http://java.sun.com/docs/books/jni/html/design.html#2193

14 years agoFix several leaks in OpenSSL JNI cipher suites code.
Elliott Hughes [Wed, 7 Oct 2009 22:04:52 +0000 (15:04 -0700)]
Fix several leaks in OpenSSL JNI cipher suites code.

I first spotted the missing ReleaseStringUTFChars, but then noticed all
the duplication in the cipher suites functions, and noticed that no
copy appeared to be completely correct. The factored-out replacements
shouldn't leak, and should check all error conditions.

14 years agoMerge change I492dd3f7
Android (Google) Code Review [Wed, 7 Oct 2009 06:51:47 +0000 (02:51 -0400)]
Merge change I492dd3f7

* changes:
  Enable SMALL_BUFFERS and HANDSHAKE_CUTTHROUGH for SSL connections.

14 years agoEnable SMALL_BUFFERS and HANDSHAKE_CUTTHROUGH for SSL connections.
Nagendra Modadugu [Tue, 6 Oct 2009 22:52:53 +0000 (15:52 -0700)]
Enable SMALL_BUFFERS and HANDSHAKE_CUTTHROUGH for SSL connections.

14 years agoRemove duplication between readv and writev.
Elliott Hughes [Tue, 6 Oct 2009 22:31:35 +0000 (15:31 -0700)]
Remove duplication between readv and writev.

This also means we don't pin the three int arrays for the duration
of the syscall.

14 years agoDon't use GetPrimitiveArrayCritical around network operations.
Elliott Hughes [Tue, 6 Oct 2009 21:08:53 +0000 (14:08 -0700)]
Don't use GetPrimitiveArrayCritical around network operations.

This code seems to have been using GetPrimitiveArrayCritical to
work around the fact that it was supply JNI_ABORT on release,
where it really wanted GetByteArrayElements and to keep its
changes (since the whole point of the byte[] was to keep state
between calls).

14 years agoRemove the intermediate representation in getNetworkInterfaces.
Elliott Hughes [Tue, 6 Oct 2009 20:01:12 +0000 (13:01 -0700)]
Remove the intermediate representation in getNetworkInterfaces.

This gets rid of a lot of unnecessary complexity by going straight from
the kernel's representation to the Java representation, without the useless
C structs in between.

14 years agoMerge change Ia4c68278
Android (Google) Code Review [Tue, 6 Oct 2009 18:27:47 +0000 (14:27 -0400)]
Merge change Ia4c68278

* changes:
  Remove dead code.

14 years agoMerge change I40159068
Android (Google) Code Review [Tue, 6 Oct 2009 17:36:11 +0000 (13:36 -0400)]
Merge change I40159068

* changes:
  Use icu4jni_error more consistently.

14 years agoRemove dead code.
Elliott Hughes [Tue, 6 Oct 2009 17:18:34 +0000 (10:18 -0700)]
Remove dead code.

14 years agoMake sure res is NULL if getaddrinfo fails.
Lorenzo Colitti [Fri, 2 Oct 2009 19:45:21 +0000 (12:45 -0700)]
Make sure res is NULL if getaddrinfo fails.

14 years agoMerge change I7aabd791
Android (Google) Code Review [Tue, 6 Oct 2009 00:15:01 +0000 (20:15 -0400)]
Merge change I7aabd791

* changes:
  Refactor java_net_NetworkInterface.cpp for clarity.

14 years agoUse icu4jni_error more consistently.
Elliott Hughes [Mon, 5 Oct 2009 23:01:35 +0000 (16:01 -0700)]
Use icu4jni_error more consistently.

In BidiWrapperInterface.c, replace check_fail with icu4jni_error for better
error reporting.

In CollationInterface.c, make sure we call icu4jni_error *after* calling
the function that may or may not return an error.

14 years agoRefactor java_net_NetworkInterface.cpp for clarity.
Elliott Hughes [Sat, 3 Oct 2009 00:20:00 +0000 (17:20 -0700)]
Refactor java_net_NetworkInterface.cpp for clarity.

All I wanted to do was remove the SOCKERR_ mess, but things got out of hand.
There's still plenty of stuff that could be cleaned up, but nothing that can't
wait. I'm only doing this to make things easier for the IPv6 changes.

This patch:
* removes the SOCKERR_ mess which was causing vague "Operation failed"
IOExceptions; we now use the actual errno value of whatever caused the failure.
* simplifies memory management so we don't have to do lots of cleanup on
every exit from each function.
* simplified fd management for the same reason.
* reduces the use of the intermediate structure, going straight to Java objects
in places. (This is the unfinished work: we should get rid of the intermediate
representation. It's not useful.)
* replaces structInToJavaAddress and structInToInetAddress with a call to the
better socketAddressToInetAddress from OSNetworkSystem.cpp.
* uses more intention-revealing variable and function names.
* removes attempts to throw exceptions when perfectly good exceptions have
already been thrown.
* removes filtering of interfaces that aren't up. The RI doesn't do this
filtering, there's no reason to do it, and it's always going to be a race
condition anyway.
* removes untrue comments.
* removes a lot of inexplicably empty lines.

14 years agoSwitch to TEMP_FAILURE_RETRY now it's moved to bionic.
Elliott Hughes [Mon, 5 Oct 2009 20:48:44 +0000 (13:48 -0700)]
Switch to TEMP_FAILURE_RETRY now it's moved to bionic.

(The same EINTR_RETRY macro that used to be here has moved to <unistd.h>, so
we don't need another copy. EINTR_RETRY is a nicer name, I think, but
TEMP_FAILURE_RETRY is the GNU-compatible name.)

14 years agoMerge change Idc84bb2b
Android (Google) Code Review [Fri, 2 Oct 2009 20:19:46 +0000 (16:19 -0400)]
Merge change Idc84bb2b

* changes:
  Fix trace builder to not confuse self-verification.

14 years agoFix trace builder to not confuse self-verification.
Ben Cheng [Fri, 2 Oct 2009 19:58:52 +0000 (12:58 -0700)]
Fix trace builder to not confuse self-verification.

14 years agoMake sure res is NULL if getaddrinfo fails.
Lorenzo Colitti [Fri, 2 Oct 2009 19:45:21 +0000 (12:45 -0700)]
Make sure res is NULL if getaddrinfo fails.

14 years agoMerge change I4bf8618f
Android (Google) Code Review [Fri, 2 Oct 2009 19:37:32 +0000 (15:37 -0400)]
Merge change I4bf8618f

* changes:
  Add back missing shared libraries used by executable in link command.  These libraries are linked though dependencies of other libraries.  While that works, it is not the right thing to do.

14 years agoAdd back missing shared libraries used by executable in link command. These
Doug Kwan [Fri, 2 Oct 2009 18:21:07 +0000 (11:21 -0700)]
Add back missing shared libraries used by executable in link command.  These
libraries are linked though dependencies of other libraries.  While that works,
it is not the right thing to do.

14 years agoRemove adb networking support from dalvik/libcore.
Elliott Hughes [Wed, 30 Sep 2009 20:26:11 +0000 (13:26 -0700)]
Remove adb networking support from dalvik/libcore.

There's more to be removed from other projects, but this should probably
come out first.

Bug: 1122968

14 years agoMerge change Id5ccf4bc
Android (Google) Code Review [Fri, 2 Oct 2009 14:52:14 +0000 (10:52 -0400)]
Merge change Id5ccf4bc

* changes:
  Catch bad getStackTrace() calls.

14 years agoMerge change I9d8f66aa
Android (Google) Code Review [Fri, 2 Oct 2009 00:37:18 +0000 (20:37 -0400)]
Merge change I9d8f66aa

* changes:
  Switch java_net_NetworkInterface.c to C++.

14 years agoSwitch java_net_NetworkInterface.c to C++.
Elliott Hughes [Fri, 2 Oct 2009 00:20:14 +0000 (17:20 -0700)]
Switch java_net_NetworkInterface.c to C++.

(I have a bigger change to make to this file, but the web claims that it's
best to keep renames in minimally small patches so git doesn't get confused.)

14 years agoCatch bad getStackTrace() calls.
Andy McFadden [Fri, 2 Oct 2009 00:10:47 +0000 (17:10 -0700)]
Catch bad getStackTrace() calls.

Normally Throwable.getStackTrace() can't be called until after there's a
stack trace, but with a debugger you can call it during construction.
We weren't expecting that and the VM went boom.

14 years agoMerge change I3bc71eab
Android (Google) Code Review [Fri, 2 Oct 2009 00:07:17 +0000 (20:07 -0400)]
Merge change I3bc71eab

* changes:
  :: is a valid local address on a newly-created socket if IPv6 is preferred.

14 years ago:: is a valid local address on a newly-created socket if IPv6 is preferred.
Lorenzo Colitti [Thu, 1 Oct 2009 19:24:40 +0000 (12:24 -0700)]
:: is a valid local address on a newly-created socket if IPv6 is preferred.

14 years agoam ae8d0254: am 0c0cfd5c: Merge change I96cd6f5b into eclair
Lorenzo Colitti [Thu, 1 Oct 2009 20:47:10 +0000 (13:47 -0700)]
am ae8d0254: am 0c0cfd5c: Merge change I96cd6f5b into eclair

Merge commit 'ae8d0254dd69392dae9c922462ca2a01944b6eef'

* commit 'ae8d0254dd69392dae9c922462ca2a01944b6eef':
  Make the socket test accept ::1 as a valid result for

14 years agoam 1507c7ce: am f94c5d77: More multicast fixes.
Lorenzo Colitti [Thu, 1 Oct 2009 20:47:04 +0000 (13:47 -0700)]
am 1507c7ce: am f94c5d77: More multicast fixes.

Merge commit '1507c7ce4fc88f7bdf5e89ba10839809693eeefb'

* commit '1507c7ce4fc88f7bdf5e89ba10839809693eeefb':
  More multicast fixes.

14 years agoam 003d7f8d: am e851c562: Merge change Iea75a523 into eclair
Lorenzo Colitti [Thu, 1 Oct 2009 20:46:58 +0000 (13:46 -0700)]
am 003d7f8d: am e851c562: Merge change Iea75a523 into eclair

Merge commit '003d7f8da66ec53b5dbece36308197dc7a932e3e'

* commit '003d7f8da66ec53b5dbece36308197dc7a932e3e':
  Fixes for socket options on multicast sockets.

14 years agoMerge change I2cdad38a
Android (Google) Code Review [Thu, 1 Oct 2009 20:35:06 +0000 (16:35 -0400)]
Merge change I2cdad38a

* changes:
  Update archive to Harmony r820767.

14 years agoUpdate archive to Harmony r820767.
Jesse Wilson [Thu, 1 Oct 2009 20:16:51 +0000 (13:16 -0700)]
Update archive to Harmony r820767.

14 years agoam aa4320a4: am 1131d3da: Merge change Ie2e14dde into eclair
Jesse Wilson [Thu, 1 Oct 2009 19:22:38 +0000 (12:22 -0700)]
am aa4320a4: am 1131d3da: Merge change Ie2e14dde into eclair

Merge commit 'aa4320a4fb27684bd70cfb4d82feca3845ad272e'

* commit 'aa4320a4fb27684bd70cfb4d82feca3845ad272e':
  Remove @KnownFailure tags for tests that pass.

14 years agoam 2b791cc2: am 910363bd: Merge change Ib5dc3f1f into eclair
Jesse Wilson [Thu, 1 Oct 2009 19:22:26 +0000 (12:22 -0700)]
am 2b791cc2: am 910363bd: Merge change Ib5dc3f1f into eclair

Merge commit '2b791cc256e80f93fef7db2157f1cee202133201'

* commit '2b791cc256e80f93fef7db2157f1cee202133201':
  Fixing a lame test that was relying on hashmap iteration order.

14 years agoam a20c6d23: am b5b7f4ba: Merge change I9899be9d into eclair
Jesse Wilson [Thu, 1 Oct 2009 19:20:48 +0000 (12:20 -0700)]
am a20c6d23: am b5b7f4ba: Merge change I9899be9d into eclair

Merge commit 'a20c6d2347224d89dced471e61a36610699b7e71'

* commit 'a20c6d2347224d89dced471e61a36610699b7e71':
  Fixing a Harmony regression in ObjectInputStream.

14 years agoam 18ae1786: am ffa33efc: Merge change I75630000 into eclair
Jesse Wilson [Thu, 1 Oct 2009 19:17:17 +0000 (12:17 -0700)]
am 18ae1786: am ffa33efc: Merge change I75630000 into eclair

Merge commit '18ae1786b572d7385cbddd7da3167e190b952ded'

* commit '18ae1786b572d7385cbddd7da3167e190b952ded':
  Fixing tests that exercise SecurityManager plus stack inspection.

14 years agoMerge change I76ecf19c
Android (Google) Code Review [Thu, 1 Oct 2009 19:15:08 +0000 (15:15 -0400)]
Merge change I76ecf19c

* changes:
  Use jniThrowException instead of FindClass/ThrowNew.

14 years agoam 4b304284: am 7f51bfee: Merge change I86898f45 into eclair
Jesse Wilson [Thu, 1 Oct 2009 18:50:21 +0000 (11:50 -0700)]
am 4b304284: am 7f51bfee: Merge change I86898f45 into eclair

Merge commit '4b30428421d4ad93d9e6fc34bc0190a5097dc4a6'

* commit '4b30428421d4ad93d9e6fc34bc0190a5097dc4a6':
  Fix BigInteger math bugs.

14 years agoUse jniThrowException instead of FindClass/ThrowNew.
Elliott Hughes [Thu, 1 Oct 2009 18:20:29 +0000 (11:20 -0700)]
Use jniThrowException instead of FindClass/ThrowNew.

Always use our best-of-breed code for throwing exceptions. The remaining
callers of Throw have good reason, and the only caller of ThrowNew is
now JNIHelp.c (jniThrowException) itself.

14 years agoFix a memory disambiguation and a SFP/DFP assembling bug in the JIT.
Ben Cheng [Thu, 1 Oct 2009 05:53:44 +0000 (22:53 -0700)]
Fix a memory disambiguation and a SFP/DFP assembling bug in the JIT.

14 years agoam 0c0cfd5c: Merge change I96cd6f5b into eclair
Lorenzo Colitti [Thu, 1 Oct 2009 04:16:39 +0000 (21:16 -0700)]
am 0c0cfd5c: Merge change I96cd6f5b into eclair

Merge commit '0c0cfd5ce4a26187fb910ba701d0021989103a25' into eclair-plus-aosp

* commit '0c0cfd5ce4a26187fb910ba701d0021989103a25':
  Make the socket test accept ::1 as a valid result for

14 years agoam f94c5d77: More multicast fixes.
Lorenzo Colitti [Thu, 1 Oct 2009 04:15:21 +0000 (21:15 -0700)]
am f94c5d77: More multicast fixes.

Merge commit 'f94c5d77ab659bfc1644b524fc006f24cbf6f694' into eclair-plus-aosp

* commit 'f94c5d77ab659bfc1644b524fc006f24cbf6f694':
  More multicast fixes.

14 years agoam e851c562: Merge change Iea75a523 into eclair
Lorenzo Colitti [Thu, 1 Oct 2009 04:12:23 +0000 (21:12 -0700)]
am e851c562: Merge change Iea75a523 into eclair

Merge commit 'e851c562ee5eb514135b5066553fcef6b0e5c333' into eclair-plus-aosp

* commit 'e851c562ee5eb514135b5066553fcef6b0e5c333':
  Fixes for socket options on multicast sockets.

14 years agoMerge change I96cd6f5b into eclair
Android (Google) Code Review [Thu, 1 Oct 2009 02:27:13 +0000 (22:27 -0400)]
Merge change I96cd6f5b into eclair

* changes:
  Make the socket test accept ::1 as a valid result for InetAddress.getByName(null) if the system is set to prefer IPv6 addresses.

14 years agoMake the socket test accept ::1 as a valid result for
Lorenzo Colitti [Thu, 1 Oct 2009 01:31:29 +0000 (18:31 -0700)]
Make the socket test accept ::1 as a valid result for
InetAddress.getByName(null) if the system is set to prefer IPv6 addresses.

Change-Id: I96cd6f5b632994b73af13e341cf6f684f6eee4cd

14 years agoMore multicast fixes.
Lorenzo Colitti [Thu, 1 Oct 2009 00:51:26 +0000 (17:51 -0700)]
More multicast fixes.

1. Make native code properly set network interface indexes that are used for
   new-style multicast socket options.
2. For IP_MULTICAST_IF, check that the address is IPv4, not the socket.
3. Remove a @KnownFailure annotation for a test that now passes.

This removes one test error and changes it into a more benign failure. The
remaining test failures seem to be due to Linux bening permissive about which
interfaces you can receive multicast traffic on, which is probably good enough
for now.

Change-Id: Id1fddee338addcfce821672b983485c7dd4983d4

14 years agoMerge change Iea75a523 into eclair
Android (Google) Code Review [Wed, 30 Sep 2009 23:37:27 +0000 (19:37 -0400)]
Merge change Iea75a523 into eclair

* changes:
  Fixes for socket options on multicast sockets.

14 years agoFixes for socket options on multicast sockets.
Lorenzo Colitti [Wed, 30 Sep 2009 22:49:22 +0000 (15:49 -0700)]
Fixes for socket options on multicast sockets.

1. Properly pass get/setsockopt the pointer to the socket option instead of the
   pointer to the pointer to the option. This was not caught at compile time
   because it's a void *.
2. Handle IPv4 multicast addresses on IPv6 sockets. This is important because
   current devices create IPv6 sockets by default.
3. Use the proper options for IPv6 multicast (i.e., IPV6_{ADD,DROP}_MEMBERSHIP
   instead of IP_{ADD,DROP}_MEMBERSHIP)
4. Use integers instead of bytes when getting or setting the multicast TTL
   because that's what the Linux kernel uses.

These fix 10 of the 11 MulticastSocketTest failures. Also, minor changes:

1. Add ifdefd-out logging functions for get/setsockopt.
2. Change all instances of IPPROTO_{IP,IPv6} to SOL_{IP,IPV6} in get/setsockopt
   calls. Even though the values are the same (so the code worked), this way is
   more correct.

Change-Id: Iea75a523d7e71f0b361a42c0e39d3ef075dc7ff4

14 years agoam 1131d3da: Merge change Ie2e14dde into eclair
Jesse Wilson [Wed, 30 Sep 2009 23:22:15 +0000 (16:22 -0700)]
am 1131d3da: Merge change Ie2e14dde into eclair

Merge commit '1131d3da4e3d3df7f608fb0078ec67d14035ff25' into eclair-plus-aosp

* commit '1131d3da4e3d3df7f608fb0078ec67d14035ff25':
  Remove @KnownFailure tags for tests that pass.

14 years agoMerge change Ie2e14dde into eclair
Android (Google) Code Review [Wed, 30 Sep 2009 22:49:43 +0000 (18:49 -0400)]
Merge change Ie2e14dde into eclair

* changes:
  Remove @KnownFailure tags for tests that pass.

14 years agoRemove @KnownFailure tags for tests that pass.
Jesse Wilson [Wed, 30 Sep 2009 22:39:36 +0000 (15:39 -0700)]
Remove @KnownFailure tags for tests that pass.

Also cleanup tests.api.java.io.SerializationStressTest4#test_writeObject_Proxy

14 years agoSimplify FileInputStream.skip to match the RI.
Elliott Hughes [Wed, 30 Sep 2009 22:25:29 +0000 (15:25 -0700)]
Simplify FileInputStream.skip to match the RI.

The RI throws IOException on any non-seekable stream, including stdin.
This patch removes harmony's special-case hack for stdin, and the native
cruft that wasn't even necessary if you did want a special hack for
stdin.

Bug: 1542253

14 years agoam 910363bd: Merge change Ib5dc3f1f into eclair
Jesse Wilson [Wed, 30 Sep 2009 22:33:46 +0000 (15:33 -0700)]
am 910363bd: Merge change Ib5dc3f1f into eclair

Merge commit '910363bd8d50c2a5558a71e47377928265c1219e' into eclair-plus-aosp

* commit '910363bd8d50c2a5558a71e47377928265c1219e':
  Fixing a lame test that was relying on hashmap iteration order.

14 years agoMerge change Ib5dc3f1f into eclair
Android (Google) Code Review [Wed, 30 Sep 2009 22:21:58 +0000 (18:21 -0400)]
Merge change Ib5dc3f1f into eclair

* changes:
  Fixing a lame test that was relying on hashmap iteration order.

14 years agoFixing a lame test that was relying on hashmap iteration order.
Jesse Wilson [Wed, 30 Sep 2009 22:09:17 +0000 (15:09 -0700)]
Fixing a lame test that was relying on hashmap iteration order.

14 years agoam b5b7f4ba: Merge change I9899be9d into eclair
Jesse Wilson [Wed, 30 Sep 2009 21:57:18 +0000 (14:57 -0700)]
am b5b7f4ba: Merge change I9899be9d into eclair

Merge commit 'b5b7f4ba9c8e5da38d023aa5b5ae61c8392c2e99' into eclair-plus-aosp

* commit 'b5b7f4ba9c8e5da38d023aa5b5ae61c8392c2e99':
  Fixing a Harmony regression in ObjectInputStream.

14 years agoMerge change I9899be9d into eclair
Android (Google) Code Review [Wed, 30 Sep 2009 21:50:18 +0000 (17:50 -0400)]
Merge change I9899be9d into eclair

* changes:
  Fixing a Harmony regression in ObjectInputStream.

14 years agoFixing a Harmony regression in ObjectInputStream.
Jesse Wilson [Wed, 30 Sep 2009 21:44:20 +0000 (14:44 -0700)]
Fixing a Harmony regression in ObjectInputStream.

We check the field type against the instance being
populated and not the field descriptor on the wire.
The root cause is a bug in Harmony which we should
send upstream.

14 years agoam ffa33efc: Merge change I75630000 into eclair
Jesse Wilson [Wed, 30 Sep 2009 20:40:05 +0000 (13:40 -0700)]
am ffa33efc: Merge change I75630000 into eclair

Merge commit 'ffa33efc2cae574aefbc2867dd4a7e5413282e3c' into eclair-plus-aosp

* commit 'ffa33efc2cae574aefbc2867dd4a7e5413282e3c':
  Fixing tests that exercise SecurityManager plus stack inspection.

14 years agoFix build (don't rely on transitive #include).
Elliott Hughes [Wed, 30 Sep 2009 20:37:24 +0000 (13:37 -0700)]
Fix build (don't rely on transitive #include).

The sim-eng build wasn't picking up <string.h> for memcpy(3).

14 years agoMerge change I75630000 into eclair
Android (Google) Code Review [Wed, 30 Sep 2009 20:31:20 +0000 (16:31 -0400)]
Merge change I75630000 into eclair

* changes:
  Fixing tests that exercise SecurityManager plus stack inspection.

14 years agoFixing tests that exercise SecurityManager plus stack inspection.
Jesse Wilson [Wed, 30 Sep 2009 18:57:49 +0000 (11:57 -0700)]
Fixing tests that exercise SecurityManager plus stack inspection.

The tests were both broken previously. They both relied on having
specific bootloader classes in their call stack.

14 years agoThrow meaningful IOException instances from native code.
Elliott Hughes [Sun, 27 Sep 2009 21:26:34 +0000 (14:26 -0700)]
Throw meaningful IOException instances from native code.

The Java side of OSFileSystem was throwing IOExceptions with no detail
message. If we throw from the native side instead, we can supply
meaningful explanations. This turned up a couple of bugs:

* read, readDirect, readv, writev, and ttyRead would only throw IOException
if they returned < -1, which is impossible. (writev was probably a copy & paste
from readv, and the reads were probably confused by the impedence mismatch
between Unix's use of 0 to mean end of file and -1 to mean error, and Java's
use of -1 for end of file.)

* inconsistent checking for null byte[]s passed in.

* read and write would retry on EINTR, but readDirect and writeDirect wouldn't.

* we'd silently truncate seek/lock/truncate offsets that didn't fit in 32 bits;
we now throw an IOException instead.

It also means a few native functions become "void" because errors are now
reported by throwing exceptions, and the Java functions that used to call them
are no longer needed.

Also change ProcessManager to use jniThrowIOException, remove the unused
throwIOExceptionStr from OSNetworkSystem.cpp, and remove the KnownFailure from
FileTest's test_delete, now we have a fixed version of yaffs that won't
rmdir(2) non-empty directories.

Bug: 1542253

14 years agoMerge change I866cc5d6
Android (Google) Code Review [Wed, 30 Sep 2009 15:24:55 +0000 (11:24 -0400)]
Merge change I866cc5d6

* changes:
  Improve run-core-tests.

14 years agoam 7f51bfee: Merge change I86898f45 into eclair
Jesse Wilson [Wed, 30 Sep 2009 05:43:10 +0000 (22:43 -0700)]
am 7f51bfee: Merge change I86898f45 into eclair

Merge commit '7f51bfee5fc5fb34fe89f3d74f7fd40d834c0fc2' into eclair-plus-aosp

* commit '7f51bfee5fc5fb34fe89f3d74f7fd40d834c0fc2':
  Fix BigInteger math bugs.

14 years agoMerge change I86898f45 into eclair
Android (Google) Code Review [Wed, 30 Sep 2009 05:35:12 +0000 (01:35 -0400)]
Merge change I86898f45 into eclair

* changes:
  Fix BigInteger math bugs.

14 years agoFix BigInteger math bugs.
Jesse Wilson [Wed, 30 Sep 2009 05:30:14 +0000 (22:30 -0700)]
Fix BigInteger math bugs.

This initializes the internal representation before doing left shifts.
I'd originally missed this in the first Harmony update; change 20002.

14 years agoMerge change I09239e36
Android (Google) Code Review [Wed, 30 Sep 2009 04:19:55 +0000 (00:19 -0400)]
Merge change I09239e36

* changes:
  Report all RegisterNatives failures, not just the first.

14 years agoReport all RegisterNatives failures, not just the first.
Elliott Hughes [Wed, 30 Sep 2009 01:35:43 +0000 (18:35 -0700)]
Report all RegisterNatives failures, not just the first.

(It seems that when I make one mistake, I generally make
several at once.)

14 years agoImprove run-core-tests.
Elliott Hughes [Wed, 30 Sep 2009 01:05:33 +0000 (18:05 -0700)]
Improve run-core-tests.

Allow multiple tests to be specified on the command-line, and recognize
syntax errors. (Previously, as long as the arguments ended in a test
name, invalid arguments that didn't start "--" would be silently ignored.
The new test for "-" is strictly unnecessary -- the other changes are
sufficient -- but the explicit early test allows for clearer error
reporting.)

14 years agoFixed the trace builder to correctly handle excpetion throwing instruction.
Ben Cheng [Tue, 29 Sep 2009 23:12:51 +0000 (16:12 -0700)]
Fixed the trace builder to correctly handle excpetion throwing instruction.

Added a new unit test 081-hot-exceptions to target this problem.

14 years agoManual merge of change I3665f82b into master.
Lorenzo Colitti [Fri, 18 Sep 2009 22:25:06 +0000 (15:25 -0700)]
Manual merge of change I3665f82b into master.

14 years agoReplace existing ArrayList implementation with faster, simpler one.
Joshua Bloch [Mon, 21 Sep 2009 21:50:34 +0000 (14:50 -0700)]
Replace existing ArrayList implementation with faster, simpler one.

14 years agoMerge change I5e88f105
Android (Google) Code Review [Mon, 28 Sep 2009 20:59:43 +0000 (16:59 -0400)]
Merge change I5e88f105

* changes:
  Add copyright statement to dexcheck.

14 years agoAdd copyright statement to dexcheck.
Andy McFadden [Mon, 28 Sep 2009 19:36:06 +0000 (12:36 -0700)]
Add copyright statement to dexcheck.

Because even humble shell scripts deserve legal protection.

14 years agoam f591c78e: (-s ours) am 94bf2b21: Merge change 27156 into eclair
Jesse Wilson [Mon, 28 Sep 2009 17:00:28 +0000 (10:00 -0700)]
am f591c78e: (-s ours) am 94bf2b21: Merge change 27156 into eclair

Merge commit 'f591c78e3117dfbd727411386175bf1c1aef615b'

* commit 'f591c78e3117dfbd727411386175bf1c1aef615b':
  DO NOT MERGE: Cleaning up PipedInputStream

14 years agoam 2ff7a674: am 979baaea: Deprecate many of the accidentally-published APIs in dalvik...
Jesse Wilson [Mon, 28 Sep 2009 17:00:24 +0000 (10:00 -0700)]
am 2ff7a674: am 979baaea: Deprecate many of the accidentally-published APIs in dalvik.system.

Merge commit '2ff7a6741726c7f43a3cea6d30bf7c387f913e78'

* commit '2ff7a6741726c7f43a3cea6d30bf7c387f913e78':
  Deprecate many of the accidentally-published APIs in dalvik.system.

14 years agoFixed OOM exception handling in JIT'ed code and added a new unit test.
Ben Cheng [Mon, 28 Sep 2009 00:08:35 +0000 (17:08 -0700)]
Fixed OOM exception handling in JIT'ed code and added a new unit test.

14 years agoRegisters allocated for 64-bit values should be contiguous.
Ben Cheng [Sun, 27 Sep 2009 18:07:01 +0000 (11:07 -0700)]
Registers allocated for 64-bit values should be contiguous.

Found in "Karl's Mortgage Calculator" from the market.