OSDN Git Service

android-x86/bionic.git
8 years agoHide '__moddi3' symbol for x86 and mips
Dimitry Ivanov [Wed, 27 Jan 2016 23:12:19 +0000 (15:12 -0800)]
Hide '__moddi3' symbol for x86 and mips

Bug: http://b/26805673
Change-Id: I7dc213e9f25510a2a74a30e8c43fd7a64cb3dbdb

8 years agoHide '__isthreaded' for lp64 libc.so
Dimitry Ivanov [Wed, 27 Jan 2016 22:54:36 +0000 (14:54 -0800)]
Hide '__isthreaded' for lp64 libc.so

Bug: http://b/26805673
Change-Id: I2928d68287894be9f9ae7ed1858af512d8c80a3b

8 years agoMerge "Fix a sign extension bug in stdio."
Elliott Hughes [Wed, 27 Jan 2016 02:38:46 +0000 (02:38 +0000)]
Merge "Fix a sign extension bug in stdio."

8 years agoMerge "Unify names for pages allocated for small objects"
Dimitry Ivanov [Wed, 27 Jan 2016 02:28:41 +0000 (02:28 +0000)]
Merge "Unify names for pages allocated for small objects"

8 years agoFix a sign extension bug in stdio.
Elliott Hughes [Wed, 27 Jan 2016 02:25:52 +0000 (18:25 -0800)]
Fix a sign extension bug in stdio.

This also lets us test the EOVERFLOW behavior, which pointed out that the
fgetpos/fsetpos return on failure has always been wrong...

Bug: http://b/24807045
Change-Id: I35273eb07c8c9155af858adb27569983397580b6

8 years agoUnify names for pages allocated for small objects
Dimitry Ivanov [Wed, 27 Jan 2016 01:53:17 +0000 (17:53 -0800)]
Unify names for pages allocated for small objects

Bug: http://b/26776399
Change-Id: Id5b6f143a526cecca56de18ddad8857dfa1dd165

8 years agoMerge "Replace snprintf() with __libc_format_buffer()"
Tom Cherry [Wed, 27 Jan 2016 00:09:52 +0000 (00:09 +0000)]
Merge "Replace snprintf() with __libc_format_buffer()"

8 years agoReplace snprintf() with __libc_format_buffer()
Tom Cherry [Tue, 26 Jan 2016 23:27:07 +0000 (15:27 -0800)]
Replace snprintf() with __libc_format_buffer()

If snprintf() is called from the linker, it may erroneously return a
null string.  The libc internal __libc_format_buffer() does not have
this problem, so it is now used instead.

Bug: 26756577

Change-Id: I37a97e27f59b3c0a087f54a6603cc3aff7f07522

8 years agoMerge "Implement funopen64."
Elliott Hughes [Tue, 26 Jan 2016 23:26:43 +0000 (23:26 +0000)]
Merge "Implement funopen64."

8 years agoMerge "Fix lockf for LP32."
Elliott Hughes [Tue, 26 Jan 2016 22:56:36 +0000 (22:56 +0000)]
Merge "Fix lockf for LP32."

8 years agoMerge "Move android_ network functions to LIBC_PRIVATE"
Dimitry Ivanov [Tue, 26 Jan 2016 22:47:56 +0000 (22:47 +0000)]
Merge "Move android_ network functions to LIBC_PRIVATE"

8 years agoImplement funopen64.
Elliott Hughes [Tue, 26 Jan 2016 22:13:04 +0000 (14:13 -0800)]
Implement funopen64.

Bug: http://b/24807045
Change-Id: I161920978161389be34b707cc6ce8e05f760d552

8 years agoMove android_ network functions to LIBC_PRIVATE
Dimitry Ivanov [Tue, 26 Jan 2016 22:07:32 +0000 (14:07 -0800)]
Move android_ network functions to LIBC_PRIVATE

Make following functions platform-private:
 android_getaddrinfofornet
 android_getaddrinfofornetcontext
 android_gethostbyaddrfornet
 android_gethostbynamefornet

Bug: http://b/26794226
Change-Id: I0855b0b82721e4d24e918508931b4d5587fcae7d

8 years agoFix lockf for LP32.
Elliott Hughes [Tue, 26 Jan 2016 22:32:55 +0000 (14:32 -0800)]
Fix lockf for LP32.

Bug: http://b/13077650
Change-Id: Ibbe2d907d23791c908475e0875a5c745ac948813

8 years agoMerge "Factor out the waiting for children in bionic tests."
Elliott Hughes [Tue, 26 Jan 2016 21:32:13 +0000 (21:32 +0000)]
Merge "Factor out the waiting for children in bionic tests."

8 years agoFactor out the waiting for children in bionic tests.
Elliott Hughes [Tue, 26 Jan 2016 21:04:57 +0000 (13:04 -0800)]
Factor out the waiting for children in bionic tests.

Change-Id: I4a1e51b6920b33dc892d447f5bd6d10f1cb2704a

8 years agoMerge "Support _FILE_OFFSET_BITS=64 for most of <stdio.h>."
Elliott Hughes [Tue, 26 Jan 2016 20:51:59 +0000 (20:51 +0000)]
Merge "Support _FILE_OFFSET_BITS=64 for most of <stdio.h>."

8 years agoMerge "Implement POSIX lockf."
Elliott Hughes [Tue, 26 Jan 2016 20:45:32 +0000 (20:45 +0000)]
Merge "Implement POSIX lockf."

8 years agoImplement POSIX lockf.
Elliott Hughes [Tue, 26 Jan 2016 02:06:24 +0000 (18:06 -0800)]
Implement POSIX lockf.

This has been requested a few times over the years. This is basically
a very late rebase of https://android-review.googlesource.com/45470
which was abandoned years ago. One addition is that this version has
_FILE_OFFSET_BITS=64 support.

POSIX puts this in <unistd.h>. glibc also has it in <fcntl.h>.

Bug: http://b/13077650
Change-Id: I5862b1dc326e326c01ad92438ecc1578d19ba739

8 years agoSupport _FILE_OFFSET_BITS=64 for most of <stdio.h>.
Elliott Hughes [Mon, 25 Jan 2016 23:50:59 +0000 (15:50 -0800)]
Support _FILE_OFFSET_BITS=64 for most of <stdio.h>.

This doesn't address funopen, but does add fgetpos/fsetpos/fseeko/ftello.

Bug: http://b/24807045
Change-Id: Ibff6f00df5fb699c8e8f13b91a75caf024540b73

8 years agoMerge "Revert "Revert "Make sem_wait able to return errno EINTR for sdk > 23."""
Yabin Cui [Tue, 26 Jan 2016 02:20:24 +0000 (02:20 +0000)]
Merge "Revert "Revert "Make sem_wait able to return errno EINTR for sdk > 23."""

8 years agoRevert "Revert "Make sem_wait able to return errno EINTR for sdk > 23.""
Yabin Cui [Tue, 26 Jan 2016 01:38:44 +0000 (17:38 -0800)]
Revert "Revert "Make sem_wait able to return errno EINTR for sdk > 23.""

This reverts commit 6d5108520225fd2c4b10ca63565545ec120aab4a.
And add missing bionic_sdk_version.h.

Change-Id: I24cc738b1fd1d26234c52afbc787f5b3c4a9c9cb

8 years agoMerge "Fix gcc test issues."
Christopher Ferris [Tue, 26 Jan 2016 01:35:03 +0000 (01:35 +0000)]
Merge "Fix gcc test issues."

8 years agoFix gcc test issues.
Christopher Ferris [Tue, 26 Jan 2016 01:23:38 +0000 (17:23 -0800)]
Fix gcc test issues.

Change-Id: I2b26b779f5198c7c9362a452b971260a8852aa7b

8 years agoMerge "Revert "Make sem_wait able to return errno EINTR for sdk > 23.""
Elliott Hughes [Tue, 26 Jan 2016 00:32:38 +0000 (00:32 +0000)]
Merge "Revert "Make sem_wait able to return errno EINTR for sdk > 23.""

8 years agoRevert "Make sem_wait able to return errno EINTR for sdk > 23."
Dan Albert [Tue, 26 Jan 2016 00:20:06 +0000 (00:20 +0000)]
Revert "Make sem_wait able to return errno EINTR for sdk > 23."

Broke the build. There's no such file as bionic_sdk_version.h anywhere in the tree.

This reverts commit 892b61d3409e8cdf0e121c688737eb058d57f7ab.

Change-Id: Iec3f4588edfb1d1524bb5f16451fd05dc6ebe44a

8 years agoMerge "Make sem_wait able to return errno EINTR for sdk > 23."
Yabin Cui [Mon, 25 Jan 2016 23:39:29 +0000 (23:39 +0000)]
Merge "Make sem_wait able to return errno EINTR for sdk > 23."

8 years agoMerge "Fix build for gcc."
Christopher Ferris [Mon, 25 Jan 2016 22:44:56 +0000 (22:44 +0000)]
Merge "Fix build for gcc."

8 years agoFix build for gcc.
Christopher Ferris [Mon, 25 Jan 2016 22:36:34 +0000 (14:36 -0800)]
Fix build for gcc.

Gcc doesn't like the brace object initialization, so make all of
the Feature objects explicit.

Also, no arguments to the error_log macros make gcc unhappy, so add
an option to turn these into warnings. These will be fixed when we
add the explicit _error and _warn log functions.

Change-Id: I35af834dabb5548923e893dd980a751fdebfa13a

8 years agoMake sem_wait able to return errno EINTR for sdk > 23.
Yabin Cui [Mon, 25 Jan 2016 19:37:16 +0000 (11:37 -0800)]
Make sem_wait able to return errno EINTR for sdk > 23.

Posix standards says sem_wait is interruptible by the delivery
of a signal. To keep compatiblity with old apps, only fix that
in newer sdk versions.

Bug: 26743454

Change-Id: I924cbb436658e3e0f397c922d866ece99b8241a3

8 years agoMerge "Malloc debug rewrite."
Christopher Ferris [Mon, 25 Jan 2016 20:48:29 +0000 (20:48 +0000)]
Merge "Malloc debug rewrite."

8 years agoMerge "Move internal FILE flags macros to "local.h" from <stdio.h>."
Elliott Hughes [Mon, 25 Jan 2016 19:35:36 +0000 (19:35 +0000)]
Merge "Move internal FILE flags macros to "local.h" from <stdio.h>."

8 years agoMerge "Include libz for new libelf."
Chih-hung Hsieh [Mon, 25 Jan 2016 19:31:23 +0000 (19:31 +0000)]
Merge "Include libz for new libelf."

8 years agoInclude libz for new libelf.
Chih-Hung Hsieh [Mon, 25 Jan 2016 18:28:26 +0000 (10:28 -0800)]
Include libz for new libelf.

New external/elfutils needs libz.

Change-Id: Ib2f2d56d4831809509a0fb3a849656f68adece7f

8 years agoMove internal FILE flags macros to "local.h" from <stdio.h>.
Elliott Hughes [Mon, 25 Jan 2016 19:10:47 +0000 (11:10 -0800)]
Move internal FILE flags macros to "local.h" from <stdio.h>.

Bug: http://b/24807045
Change-Id: Ia42ec1907370b4af957ece94a856f71c7ee27cb7

8 years agoMalloc debug rewrite.
Christopher Ferris [Tue, 17 Nov 2015 01:30:32 +0000 (17:30 -0800)]
Malloc debug rewrite.

The major components of the rewrite:

- Completely remove the qemu shared library code. Nobody was using it
  and it appears to have broken at some point.
- Adds the ability to enable/disable different options independently.
- Adds a new option that can enable the backtrace on alloc/free when
  a process gets a specific signal.
- Adds a new way to enable malloc debug. If a special property is
  set, and the process has an environment variable set, then debug
  malloc will be enabled. This allows something that might be
  a derivative of app_process to be started with an environment variable
  being enabled.
- get_malloc_leak_info() used to return one element for each pointer that
  had the exact same backtrace. The new version returns information for
  every one of the pointers with same backtrace. It turns out ddms already
  automatically coalesces these, so the old method simply hid the fact
  that there where multiple pointers with the same amount of backtrace.
- Moved all of the malloc debug specific code into the library.
  Nothing related to the malloc debug data structures remains in libc.
- Removed the calls to the debug malloc cleanup routine. Instead, I
  added an atexit call with the debug malloc cleanup routine. This gets
  around most problems related to the timing of doing the cleanup.

The new properties and environment variables:

libc.debug.malloc.options
  Set by option name (such as "backtrace"). Setting this to a bad value
  will cause a usage statement to be printed to the log.

libc.debug.malloc.program
  Same as before. If this is set, then only the program named will
  be launched with malloc debug enabled. This is not a complete match,
  but if any part of the property is in the program name, malloc debug is
  enabled.

libc.debug.malloc.env_enabled
  If set, then malloc debug is only enabled if the running process has the
  environment variable LIBC_DEBUG_MALLOC_ENABLE set.

Bug: 19145921

Change-Id: I7b0e58cc85cc6d4118173fe1f8627a391b64c0d7

8 years agoMerge "Add _seek64 to FILE."
Elliott Hughes [Mon, 25 Jan 2016 18:50:41 +0000 (18:50 +0000)]
Merge "Add _seek64 to FILE."

8 years agoMerge "Remove dlmalloc."
Josh Gao [Mon, 25 Jan 2016 18:42:55 +0000 (18:42 +0000)]
Merge "Remove dlmalloc."

8 years agoMerge "Add another stdio test."
Elliott Hughes [Mon, 25 Jan 2016 18:31:35 +0000 (18:31 +0000)]
Merge "Add another stdio test."

8 years agoRemove dlmalloc.
Josh Gao [Thu, 7 Jan 2016 01:57:44 +0000 (17:57 -0800)]
Remove dlmalloc.

Bug: http://b/17207577
Change-Id: Ie009badca6deb1f91b27a4340b70cdd6bedff893

8 years agoAdd _seek64 to FILE.
Elliott Hughes [Fri, 22 Jan 2016 23:04:51 +0000 (15:04 -0800)]
Add _seek64 to FILE.

Move fdopen/fopen/freopen and change them to initialize _seek64 instead
of the legacy _seek. The in-memory streams can stick with _seek for now,
since you're not going to fit a > 4GiB in-memory stream on a 32-bit device
anyway.

Bug: http://b/24807045
Change-Id: I09dcb426817b571415ce24d4d15f364cdda395b3

8 years agoMerge "Put struct FILE back how NDK-built apps expect it."
Elliott Hughes [Sat, 23 Jan 2016 04:50:40 +0000 (04:50 +0000)]
Merge "Put struct FILE back how NDK-built apps expect it."

8 years agoPut struct FILE back how NDK-built apps expect it.
Elliott Hughes [Sat, 23 Jan 2016 03:18:48 +0000 (19:18 -0800)]
Put struct FILE back how NDK-built apps expect it.

The first rule of stdio is you never change struct FILE. This broke all
NDK-built apps that used stdin/stdout/stderr. (Which is more than you
might think, given that those streams don't go anywhere useful. Svelte!)

I've added a big code comment because I knew when I removed the field that
doing so was a mistake, but I couldn't think why.

Bug: http://b/24807045
Bug: http://b/26747402
Change-Id: Ie1233586b223bb1cdf8e354c66d5ff23487a833a

8 years agoAdd another stdio test.
Elliott Hughes [Sat, 23 Jan 2016 03:22:44 +0000 (19:22 -0800)]
Add another stdio test.

This test didn't catch anything, but it does ensure that we exercise
the "lots of files" case.

Bug: http://b/26747402
Change-Id: I6c51c6436029572a49190d509f131eb93b808652

8 years agoMerge "Revert "Temporary apply LIBC version to __pthread_gettid""
Dimitry Ivanov [Fri, 22 Jan 2016 18:38:08 +0000 (18:38 +0000)]
Merge "Revert "Temporary apply LIBC version to __pthread_gettid""

8 years agoMerge "Loosen up sys_time.gettimeofday."
Elliott Hughes [Fri, 22 Jan 2016 03:19:20 +0000 (03:19 +0000)]
Merge "Loosen up sys_time.gettimeofday."

8 years agoRevert "Temporary apply LIBC version to __pthread_gettid"
Dimitry Ivanov [Thu, 21 Jan 2016 22:25:32 +0000 (22:25 +0000)]
Revert "Temporary apply LIBC version to __pthread_gettid"

This reverts commit 0ef1d121b5e4845f4ef3b59ae9a1f99ceb531186.

Bug: http://b/26392296
Bug: http://b/26391427
Change-Id: I7bbb555de3a43813e7623ff6ad4e17874d283eca

8 years agoMerge "libc: hide __signalfd4 symbol"
Dimitry Ivanov [Fri, 22 Jan 2016 01:41:27 +0000 (01:41 +0000)]
Merge "libc: hide __signalfd4 symbol"

8 years agoMerge "libc: hide fake_gmtime_r and fake_localtime_r"
Dimitry Ivanov [Fri, 22 Jan 2016 01:40:45 +0000 (01:40 +0000)]
Merge "libc: hide fake_gmtime_r and fake_localtime_r"

8 years agoLoosen up sys_time.gettimeofday.
Elliott Hughes [Fri, 22 Jan 2016 00:43:43 +0000 (16:43 -0800)]
Loosen up sys_time.gettimeofday.

We've seen it take 1146us on Nexus 9 (which did have exceptionally slow
system calls).

Bug: http://b/26724042
Change-Id: I263b7e1267d58fe4a6528403d03e5b245fdcd528

8 years agolibc: hide fake_gmtime_r and fake_localtime_r
Dimitry Ivanov [Fri, 22 Jan 2016 00:05:23 +0000 (16:05 -0800)]
libc: hide fake_gmtime_r and fake_localtime_r

Bug: http://b/26274444
Change-Id: Icf96a00142a287d8d3466d2545e213e605601b42

8 years agoMerge "linker: align allocated blocks to 16 bytes"
Dimitry Ivanov [Thu, 21 Jan 2016 23:23:49 +0000 (23:23 +0000)]
Merge "linker: align allocated blocks to 16 bytes"

8 years agolibc: hide __signalfd4 symbol
Dimitry Ivanov [Thu, 21 Jan 2016 23:19:52 +0000 (15:19 -0800)]
libc: hide __signalfd4 symbol

Bug: http://b/26274444
Change-Id: Iaa2df640cac07e2e407ca11b9701ee9e11729146

8 years agolinker: align allocated blocks to 16 bytes
Dimitry Ivanov [Thu, 21 Jan 2016 18:55:40 +0000 (10:55 -0800)]
linker: align allocated blocks to 16 bytes

C/C++ requires the result of malloc/new to be
aligned for any primitive type.

Change-Id: I715b7679e738f34b3b409993fb3ef242e1321b7f

8 years agoMerge "Simplify fseek/ftell."
Elliott Hughes [Thu, 21 Jan 2016 18:35:18 +0000 (18:35 +0000)]
Merge "Simplify fseek/ftell."

8 years agoSimplify fseek/ftell.
Elliott Hughes [Thu, 21 Jan 2016 01:14:53 +0000 (17:14 -0800)]
Simplify fseek/ftell.

Another step towards _FILE_OFFSET_BITS=64 support.

Bug: http://b/24807045
Change-Id: I00b83c81a7b108176c4d9437bc32611f73b7e967

8 years agoMerge "Remove dependency on zipalign."
Christopher Ferris [Thu, 21 Jan 2016 18:31:12 +0000 (18:31 +0000)]
Merge "Remove dependency on zipalign."

8 years agoMerge "Do not unmap reserved region on dlclose"
Dimitry Ivanov [Thu, 21 Jan 2016 05:30:31 +0000 (05:30 +0000)]
Merge "Do not unmap reserved region on dlclose"

8 years agoDo not unmap reserved region on dlclose
Dimitry Ivanov [Fri, 15 Jan 2016 19:13:35 +0000 (11:13 -0800)]
Do not unmap reserved region on dlclose

dlclose used to unmap the part of the reserved region
for ANDROID_DLEXT_RESERVED_ADDRESS that was neccessary
to map PT_LOAD segments. With this change dlclose
replaces mapped PT_LOAD segments with a PROT_NONE,
MAP_ANONYMOUS | MAP_NORESERVE.

Previously caller was unmapping the reserved region after
the failed dlclose which led to race condition when someone
else reused the region freed by dlclose but before the unmap
by the chromium code.

Bug: http://code.google.com/p/chromium/issues/detail?id=568880
Change-Id: I0f5eaa2bf6641f83dde469b631c518482acc59a2

8 years agoRemove dependency on zipalign.
Christopher Ferris [Wed, 20 Jan 2016 04:32:37 +0000 (20:32 -0800)]
Remove dependency on zipalign.

Roll our own version of zipalign so that we can break the dependency
on the build tools zipalign. This breaks the transitive dependency
on androidfw so that building bionic unit tests in brillo works again.

Also modify the DlExtTest.ExtInfoUseFdWithOffset test so it dynamically
gets the offset of the shared library inside of the zip instead of
hard-coding the value.

Bug: 25446938
Change-Id: Idfb5d3089960a94eefa2c76e03da1ad2f4d7fb2f

8 years agoMerge "Move stdio implementation details around a little."
Elliott Hughes [Wed, 20 Jan 2016 23:07:50 +0000 (23:07 +0000)]
Merge "Move stdio implementation details around a little."

8 years agoMerge "Update Android.bp to match Android.mk"
Colin Cross [Wed, 20 Jan 2016 21:10:34 +0000 (21:10 +0000)]
Merge "Update Android.bp to match Android.mk"

8 years agoUpdate Android.bp to match Android.mk
Colin Cross [Wed, 20 Jan 2016 20:01:19 +0000 (12:01 -0800)]
Update Android.bp to match Android.mk

Change-Id: Ia14a7af94d6220b3078b8d37b76990454b16703c

8 years agoMerge "Update Android.bp to match Android.mk"
Colin Cross [Wed, 20 Jan 2016 19:58:16 +0000 (19:58 +0000)]
Merge "Update Android.bp to match Android.mk"

8 years agoMove stdio implementation details around a little.
Elliott Hughes [Wed, 20 Jan 2016 00:28:15 +0000 (16:28 -0800)]
Move stdio implementation details around a little.

Change-Id: I24594426d5479bdd55cbef0ab1b7d76c249dbd0c

8 years agoMerge "Make FILE*s less usable after fclose(3)."
Elliott Hughes [Wed, 20 Jan 2016 00:13:45 +0000 (00:13 +0000)]
Merge "Make FILE*s less usable after fclose(3)."

8 years agoMake FILE*s less usable after fclose(3).
Elliott Hughes [Tue, 19 Jan 2016 23:46:05 +0000 (15:46 -0800)]
Make FILE*s less usable after fclose(3).

BSD doesn't invalidate the fd stored in struct FILE, which can make
it possible (via fileno(3), for example), to perform operations on
an fd you didn't intend to (rather than just failing with EBADF).

Fixing this makes the code slightly simpler anyway, and might help
catch bad code before it ships.

Bug: http://stackoverflow.com/questions/10816837/fclose-works-differently-on-android-and-linux
Change-Id: I9db74584038229499197a2695c70b58ed0372a87

8 years agoUpdate Android.bp to match Android.mk
Colin Cross [Tue, 19 Jan 2016 20:50:20 +0000 (12:50 -0800)]
Update Android.bp to match Android.mk

Change-Id: Ib6ab28c5b4569c9537c4647b3661166fdb82544a

8 years agoMerge "Switch libc default to clang."
Chih-hung Hsieh [Tue, 19 Jan 2016 20:04:47 +0000 (20:04 +0000)]
Merge "Switch libc default to clang."

8 years agoSwitch libc default to clang.
Chih-Hung Hsieh [Tue, 19 Jan 2016 18:59:34 +0000 (10:59 -0800)]
Switch libc default to clang.

* Default to clang when USE_CLANG_PLATFORM_BUILD is not set
  and the target has no clang bug.

BUG: 26102335
Change-Id: Ied6c9dc5593bfbadbb8d8b38e66ea237d649bae5

8 years agoMerge "Fix GCC build breakage."
Elliott Hughes [Tue, 19 Jan 2016 17:48:28 +0000 (17:48 +0000)]
Merge "Fix GCC build breakage."

8 years agoFix GCC build breakage.
Elliott Hughes [Tue, 19 Jan 2016 17:47:47 +0000 (09:47 -0800)]
Fix GCC build breakage.

Change-Id: I0339f525c68af942fb97f4bffc771717e67e0e07

8 years agoMerge "Add more fortify symbols to the expected differences from glibc."
Elliott Hughes [Tue, 19 Jan 2016 17:25:01 +0000 (17:25 +0000)]
Merge "Add more fortify symbols to the expected differences from glibc."

8 years agoMerge "Implement if_nameindex(3)/if_freenameindex(3)."
Elliott Hughes [Tue, 19 Jan 2016 17:24:16 +0000 (17:24 +0000)]
Merge "Implement if_nameindex(3)/if_freenameindex(3)."

8 years agoImplement if_nameindex(3)/if_freenameindex(3).
Elliott Hughes [Sat, 16 Jan 2016 05:02:56 +0000 (21:02 -0800)]
Implement if_nameindex(3)/if_freenameindex(3).

This is just a subset of the recently-implemented getifaddrs(3), though if
we want to handle interfaces (such as "rmnet_*") that don't have an address,
we need to either expose ifaddrs_storage and keep track of which interfaces
we've already seen (which is pretty messy), or refactor the netlink code so
we can reuse it and just extract the information we need for if_nameindex(3).
This patch goes the latter route.

Also clean up if_nametoindex(3) and if_indextoname(3).

Change-Id: I5ffc5df0bab62286cdda2e7af06f032c767119a8

8 years agoMerge "Add more tests for getifaddrs(3)"
Yi Kong [Sun, 17 Jan 2016 22:48:36 +0000 (22:48 +0000)]
Merge "Add more tests for getifaddrs(3)"

8 years agoAdd more fortify symbols to the expected differences from glibc.
Elliott Hughes [Sat, 16 Jan 2016 03:54:31 +0000 (19:54 -0800)]
Add more fortify symbols to the expected differences from glibc.

Change-Id: I6266b2e6cbea3c014b4ea30a7100186965e40cf1

8 years agoMerge "Sync with upstream OpenBSD."
Elliott Hughes [Sat, 16 Jan 2016 03:02:06 +0000 (03:02 +0000)]
Merge "Sync with upstream OpenBSD."

8 years agoMerge "Align Soong builds closer to Make"
Dan Willemsen [Sat, 16 Jan 2016 00:47:39 +0000 (00:47 +0000)]
Merge "Align Soong builds closer to Make"

8 years agoSync with upstream OpenBSD.
Elliott Hughes [Sat, 16 Jan 2016 00:30:18 +0000 (16:30 -0800)]
Sync with upstream OpenBSD.

Also some minor build cleanup.

Change-Id: Ibd20602d7ea45685f0c47fceb00ffd6c7ae35954

8 years agoAlign Soong builds closer to Make
Dan Willemsen [Sat, 16 Jan 2016 00:00:57 +0000 (16:00 -0800)]
Align Soong builds closer to Make

This moves the Android.bp file to use wildcards in the same places that
they're using in the Android.mk file. It also fixes a file that was in a
different order.

Make and Soong still produce binaries with object files in different
orders, but that's due to Make reordering the object files based on
compile type. Soong keeps the original specified order. It's not
possible to emulate the reordered files in the Android.bp, since the
arch-specific files won't interleave properly.

Change-Id: I9052b3ed7c523c13df5cbe606f913c32c88c7c5f

8 years agoMerge "Add comment for [p]select_smoke tests STDIN issue."
Christopher Ferris [Thu, 14 Jan 2016 20:04:29 +0000 (20:04 +0000)]
Merge "Add comment for [p]select_smoke tests STDIN issue."

8 years agoAdd comment for [p]select_smoke tests STDIN issue.
Christopher Ferris [Thu, 14 Jan 2016 19:12:38 +0000 (11:12 -0800)]
Add comment for [p]select_smoke tests STDIN issue.

Change-Id: I59cde8b5aaac3e27419ca86d16f85e5af568acf9

8 years agoAdd more tests for getifaddrs(3)
Yi Kong [Wed, 13 Jan 2016 11:28:14 +0000 (11:28 +0000)]
Add more tests for getifaddrs(3)

This adds the following two checks:

* getifaddrs sees the same list of interfaces as /sys/class/net.
* IPv4 addresses we get from netdevice(7) agrees with results from
  getifaddrs.

Change-Id: I2f6d79d0b5cde6d98a0f671d1623b6b2bc75b60f

8 years agoMerge "Fix Soong mips builds"
Dan Willemsen [Thu, 14 Jan 2016 08:16:02 +0000 (08:16 +0000)]
Merge "Fix Soong mips builds"

8 years agoFix Soong mips builds
Dan Willemsen [Thu, 14 Jan 2016 07:22:22 +0000 (23:22 -0800)]
Fix Soong mips builds

Change-Id: I6ae8208e077d831969b08e7abd232deaa20ceca1

8 years agoMerge "Fix select failures when STDIN is ready."
Christopher Ferris [Thu, 14 Jan 2016 07:04:53 +0000 (07:04 +0000)]
Merge "Fix select failures when STDIN is ready."

8 years agoFix select failures when STDIN is ready.
Christopher Ferris [Thu, 14 Jan 2016 06:38:09 +0000 (22:38 -0800)]
Fix select failures when STDIN is ready.

The select_smoke and pselect_smoke test can fail if STDIN has data ready
to be read. The easiest way to see the failure is to type on the command
line while running the tests.

To avoid this, allow the return value to be 2 or 3 and check which fds
are ready to be read.

Change-Id: Iafba332c5f3ed1943e3d34501f123dd45f06a8c4

8 years agoMerge "Escape failure messages in XML test output."
Dan Albert [Thu, 14 Jan 2016 06:12:32 +0000 (06:12 +0000)]
Merge "Escape failure messages in XML test output."

8 years agoEscape failure messages in XML test output.
Dan Albert [Thu, 14 Jan 2016 05:48:56 +0000 (21:48 -0800)]
Escape failure messages in XML test output.

The gtest XML format requires escaped HTML characters in the test
results.

Change-Id: Ieb9519a55cb52093dfb10a88e883b569bc372cdb

8 years agoMerge "Add method to run fortified versions of funcs."
Christopher Ferris [Thu, 14 Jan 2016 05:16:33 +0000 (05:16 +0000)]
Merge "Add method to run fortified versions of funcs."

8 years agoAdd method to run fortified versions of funcs.
Christopher Ferris [Wed, 13 Jan 2016 21:47:58 +0000 (13:47 -0800)]
Add method to run fortified versions of funcs.

Add a way to turn fortify off for the files that test fortify functions.

This method involves simply compiling the same file with fortify off and
changing the test name slightly.

It's not very pretty, and it assumes that only these few files test
functions that can be fortified.

Bug: 15195631
Change-Id: Iba9db1d508b7d28a1d6968019cb70fe08864827b

8 years agoMerge "Fix Soong x86 builds"
Dan Willemsen [Wed, 13 Jan 2016 21:45:14 +0000 (21:45 +0000)]
Merge "Fix Soong x86 builds"

8 years agoFix Soong x86 builds
Dan Willemsen [Wed, 13 Jan 2016 21:36:11 +0000 (13:36 -0800)]
Fix Soong x86 builds

Change-Id: Ida3f3584f832d61caf7200557ea57be799eaf38e

8 years agoMerge "Revert "Move __system_property* to LIBC_PRIVATE for lp64 libc""
Dimitry Ivanov [Wed, 13 Jan 2016 20:35:25 +0000 (20:35 +0000)]
Merge "Revert "Move __system_property* to LIBC_PRIVATE for lp64 libc""

8 years agoRevert "Move __system_property* to LIBC_PRIVATE for lp64 libc"
Dimitry Ivanov [Wed, 13 Jan 2016 20:32:12 +0000 (20:32 +0000)]
Revert "Move __system_property* to LIBC_PRIVATE for lp64 libc"

This reverts commit ff14fb5a1f809d87125fa0d14f08d486b6bf1ea1.

Bug: http://b/26497521
Change-Id: Id7131b37a31e936db0e72ef9969e1f13d2dd578f

8 years agoMerge "Rearrange build files to support USE_SOONG=true"
Colin Cross [Wed, 13 Jan 2016 20:32:09 +0000 (20:32 +0000)]
Merge "Rearrange build files to support USE_SOONG=true"

8 years agoMerge "Fix Soong x86 atom builds"
Dan Willemsen [Wed, 13 Jan 2016 20:32:07 +0000 (20:32 +0000)]
Merge "Fix Soong x86 atom builds"

8 years agoMerge "Update Android.bp for changes to Android.mk"
Colin Cross [Wed, 13 Jan 2016 20:31:39 +0000 (20:31 +0000)]
Merge "Update Android.bp for changes to Android.mk"

8 years agoFix Soong x86 atom builds
Dan Willemsen [Wed, 13 Jan 2016 03:35:40 +0000 (19:35 -0800)]
Fix Soong x86 atom builds

Change-Id: Ie92e605c499f128335a8da7cfefa7e6ae367a223