Commit graph

1072 commits

Author SHA1 Message Date
Jim Huang
28a7c35fea execvp: bcopy() is deprecated. Use memcpy() instead
The function bcopy() is marked as LEGACY in POSIX.1-2001 and removed in
POSIX.1-2008. memcpy (POSIX.1-2001) is its recommended replacement.

Change-Id: I2cc0cc4673d1368255afd11132ddbfd3f87b530b
2012-01-14 11:22:36 +08:00
Bruce Beare
e30e909363 sreadahead: adding readahead system call into bionic libc
Add bionic libc to support readahead system call.
This is needed to enable sreadahead to work.

Change-Id: I3856e1a3833db82e6cf42fd34af7631bd40cc723
Author: Winson Yung <winson.w.yung@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
2012-01-03 15:18:04 -08:00
Bruce Beare
a37f372973 readdir: fix interface to kernel getdents64 function
Issue:
  The kernel will pad the entry->d_reclen in a getdents64 call to a
  long-word boundary.  For very long records, this could exceed the
  size of a struct dirent. The mismatch in the size was causing error
  paranoid checking code in bionic to fail... thus causing an early
  "end" when reading the dirent structures from the kernel buffer.

Test:
 ls
 mkdir abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstu
 ls

Change-Id: I75d1f8e45e1655fdd7bac4a08a481d086f28073a
Author: Bruce Beare <bruce.j.beare@intel.com>
2011-12-19 09:38:48 -08:00
Erik Gilling
8d28b043e9 am 94963af2: update video/dsscomp.h
* commit '94963af28e445384e19775a838a29e6a71708179':
  update video/dsscomp.h
2011-12-13 16:02:50 -08:00
Erik Gilling
94963af28e update video/dsscomp.h
Change-Id: I9da47f7fb7f34f9c4baa860bb767cb8fd4f8020c
Signed-off-by: Erik Gilling <konkers@android.com>
2011-12-13 14:48:51 -08:00
Bruce Beare
f3087c6e86 am af96d4da: x86: libc may use the gcc flags from TARGET_linux-x86.mk
* commit 'af96d4dadc3f3d8466dbbeaf3a816e6871715fbc':
  x86: libc may use the gcc flags from TARGET_linux-x86.mk
2011-12-09 16:19:30 -08:00
Bruce Beare
af96d4dadc x86: libc may use the gcc flags from TARGET_linux-x86.mk
Change-Id: Iaf4d864d4b6fe388bd3c2d7c4d7d6e42aebb0d35
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
2011-12-09 13:54:20 -08:00
Bruce Beare
68ec71ebd6 am 7d03c9cb: pathconf: dead loop in bionic function __2_symlinks
* commit '7d03c9cbcedb1dc7e3a8210ac0001120558ec6df':
  pathconf: dead loop in bionic function __2_symlinks
2011-12-09 10:19:37 -08:00
Erik Gilling
ffe65783b4 am bba5c314: update video/dsscomp.h
* commit 'bba5c314b2420483e2c0e3e441bf54bda6935bc1':
  update video/dsscomp.h
2011-12-08 14:57:00 -08:00
Erik Gilling
bba5c314b2 update video/dsscomp.h
Change-Id: Ic5f1c01add1f2adb5a09d05c94129f3dc9cc3f1f
Signed-off-by: Erik Gilling <konkers@android.com>
2011-12-08 14:42:04 -08:00
Bruce Beare
7d03c9cbce pathconf: dead loop in bionic function __2_symlinks
Fix dead loops in file ./bionic/libc/unistd/pathconf.c

Change-Id: I7a1e6bcd9879c96bacfd376b88a1f899793295c8
Author: Jin Wei <wei.a.jin@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
2011-12-07 09:47:20 -08:00
Rabin Vincent
a73de44b7c am 177ba8cb: Prevent deadlock when using fork
* commit '177ba8cb42ed6d232e7c8bcad5e6ee21fc51a0e8':
  Prevent deadlock when using fork
2011-12-06 13:59:56 -08:00
Rabin Vincent
177ba8cb42 Prevent deadlock when using fork
When forking of a new process in bionic, it is critical that it
does not allocate any memory according to the comment in
java_lang_ProcessManager.c:
"Note: We cannot malloc() or free() after this point!
A no-longer-running thread may be holding on to the heap lock, and
an attempt to malloc() or free() would result in deadlock."
However, as fork is using standard lib calls when tracing it a bit,
they might allocate memory, and thus causing the deadlock.
This is a rewrite so that the function cpuacct_add, that fork calls,
will use system calls instead of standard lib calls.

Signed-off-by: christian bejram <christian.bejram@stericsson.com>

Change-Id: Iff22ea6b424ce9f9bf0ac8e9c76593f689e0cc86
2011-12-06 08:39:18 -08:00
Bruce Beare
35765066b9 am e4a21c89: signal: Align the sigset_t size passed to from user space to kernel.
* commit 'e4a21c89a8b24b32f7a2637b45522dfa59f2aaa4':
  signal: Align the sigset_t size passed to from user space to kernel.
2011-12-05 22:12:08 -08:00
Bruce Beare
cb835cd77c am cb1df916: string: Fix wrong comparison semantics
* commit 'cb1df9161666db2a312814752de67fc623149a9b':
  string: Fix wrong comparison semantics
2011-12-05 22:12:07 -08:00
Bruce Beare
e4a21c89a8 signal: Align the sigset_t size passed to from user space to kernel.
Pass kernel space sigset_t size to __rt_sigprocmask to workaround
the miss-match of NSIG/sigset_t definition between kernel and bionic.

Note: Patch originally from Google...
Change-Id: I4840fdc56d0b90d7ce2334250f04a84caffcba2a
Signed-off-by: Chenyang Du <chenyang.du@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
2011-12-05 18:37:33 -08:00
Bruce Beare
cb1df91616 string: Fix wrong comparison semantics
Chars are signed for x86 -- correct the comparison semantics.

Change-Id: I2049e98eb063c0b4e83ea973d3fcae49c6817dde
Author: Liubov Dmitrieva <liubov.dmitrieva@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
2011-12-05 18:37:10 -08:00
Bruce Beare
75039bafde am 89d3fdca: MALLOC_DEBUG: enable the option libc.debug.malloc = 10
* commit '89d3fdcae26980bf81a4622c3c83e48ead4c1c3a':
  MALLOC_DEBUG: enable the option libc.debug.malloc = 10
2011-12-05 17:01:13 -08:00
Bruce Beare
89d3fdcae2 MALLOC_DEBUG: enable the option libc.debug.malloc = 10
Fix the compile warning to let the libc.debug.malloc=10 works well
Due to unsuitable value comparison, which cause compiler optimize the
code of comparing two digits.

Change-Id: I0bedd596c9ca2ba308fb008da20ecb328d8548f5
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
Author: liu chuansheng <chuansheng.liu@intel.com>
2011-12-05 14:58:55 -08:00
Jack Ren
0c3d21e63c am e480fc83: bionic: fix pthread_{create, exit}/signal race condition
* commit 'e480fc83b2887388d469eb3bf58c86c610f5b082':
  bionic: fix pthread_{create, exit}/signal race condition
2011-11-29 22:42:32 -08:00
Jack Ren
621df52644 am 31e72bc3: bionic: fix __get_tls( ) crash issue
* commit '31e72bc3289acdd85b0b745fbf64c5949ca33432':
  bionic: fix __get_tls( ) crash issue
2011-11-29 22:42:31 -08:00
Jack Ren
e480fc83b2 bionic: fix pthread_{create, exit}/signal race condition
(1) in pthread_create:
    If the one signal is received before esp is subtracted by 16 and
    __thread_entry( ) is called, the stack will be cleared by kernel
    when it tries to contruct the signal stack frame. That will cause
    that __thread_entry will get a wrong tls pointer from the stack
    which leads to the segment fault when trying to access tls content.

(2) in pthread_exit
    After pthread_exit called system call unmap(), its stack will be
    freed.  If one signal is received at that time, there is no stack
    available for it.

Fixed by subtracting the child's esp by 16 before the clone system
call and by blocking signal handling before pthread_exit is started.

Author: Jack Ren <jack.ren@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
2011-11-29 17:09:51 -08:00
Jack Ren
31e72bc328 bionic: fix __get_tls( ) crash issue
When running the stress test of pthread create/destroy, a crash may
oocur in __get_tls(). That is caused by the race condition with __set_tls( ):

Author: Jack Ren <jack.ren@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
2011-11-29 17:09:15 -08:00
Eino-Ville Talvala
0d9f87a3b7 Add auto-exposure/auto-white balance lock support to soc2030 image
sensor.

Bug: 4980604
Change-Id: I1be07a23573b70eeddd9ecb2370605713aea3d03
2011-10-31 11:42:18 -07:00
Jesse Wilson
b0641d4a44 Merge "Use ENTRY and EXIT macros for strcmp, memcpy, atexit." 2011-10-12 07:51:53 -07:00
Evgeniy Stepanov
487b613e57 Use ENTRY and EXIT macros for strcmp, memcpy, atexit.
Without this change strcmp size is zero (not set), and it gets
ignored by Valgrind. Changes to memcpy and atexit don't affect the
generated binary in any way.

Change-Id: I05818cb5951f75901dc8c0eef02807a2e83a9231
2011-10-11 12:12:05 +04:00
Elliott Hughes
faa7c1d29f Update to tzdata2011l.
This affects Asia/Hebron and Pacific/Fiji (and historical data for
America/Sitka).

Change-Id: I111a34038e44416f1900f774bdb78750e815eb5f
2011-10-10 14:05:53 -07:00
Lorenzo Colitti
229ab1a33e Merge "Send both A and AAAA queries if all probes fail." 2011-09-29 10:52:23 -07:00
Lorenzo Colitti
4638822fc0 Merge "Revert "Use framework hints to determine dns query type."" 2011-09-29 10:52:16 -07:00
Lorenzo Colitti
f432de2de7 Send both A and AAAA queries if all probes fail.
AI_ADDRCONFIG is currently implemented by trying to connect
to well-known addresses in order to see if IPv4 and/or IPv6
connectivity is available.

In some cases (e.g., walled gardens with no global
connectivity) both probes can fail. If this happens,
query for both IPv4 and IPv6 addresses instead of doing
nothing and failing the query.

Bug: 5284168
Change-Id: I4e3a69ea86fb6d839a6bd31236b98da81e5cbf45
2011-09-28 22:38:08 -07:00
Lorenzo Colitti
b82532d11a Revert "Use framework hints to determine dns query type."
Change Ife82a8d8 broke IPv6 on wifi. Change I4e3a69ea is
an alternate approach that does not require any framework
changes.

Bug: 5284168
Change-Id: Ib52614be3875a2ae2eaedd1be265f90e506eda41
2011-09-28 22:37:41 -07:00
Mathias Agopian
bda5da074e fix prototype of dladdr
this breaks C++ source code in particular.

Change-Id: Ie06b5d31d23b5455e6950c470adc64dd5e7784df
2011-09-28 12:17:34 -07:00
Elliott Hughes
0096491274 Update to tzdata2011k.
Affects Palestine, Gaza, Hebron, Belarus, Ukraine, and "Russia".

Change-Id: Ib17f848c3b0e86d0bfcf289c4c4a3ae53dd2f8c4
2011-09-26 10:53:50 -07:00
Robert Greenwalt
924c8785f0 am 8af58f0f: Use framework hints to determine dns query type.
* commit '8af58f0fd4ff3fb11cb8a3c61e4654e3633906a4':
  Use framework hints to determine dns query type.
2011-09-22 23:39:54 -07:00
Robert Greenwalt
8af58f0fd4 Use framework hints to determine dns query type.
Instead of checking for IPv4 or IPv6 connectivity, try using pid-specific
hints the framework has left for us.

bug:5284168
Change-Id: Id64d48db3900865a7d58ada8309870c63d6eab12
2011-09-22 11:43:06 -07:00
JP Abgrall
771600415f am 3884bfe9: libc: popen: work around data corruption
* commit '3884bfe9661955543ce203c60f9225bbdf33f6bb':
  libc: popen: work around data corruption
2011-09-17 16:32:00 -07:00
JP Abgrall
3884bfe966 libc: popen: work around data corruption
vfork() would not save the registers that the parent would expect
to have restored after execl() completed.
Specially that execl() would call execve() underneath, further messing
up the stack of the parent.
To avoid that, we fork() for now. Later we will revisit and cleanup
vfork()+execve() to actually have vfork() store all the register
that the parent expects to see, and not those left by execve().

In the original code, looking at the registers just before the call to
popen(), and after the call showed that r7 would get clobbered.
This would leave the caller with an invalid pointer, leading to all
kinds of data corruptions.
execve() is simpler that execl() in this case.


Bug: 5336252
Change-Id: I3bf718c0bb4c0439f6f2753f153cdea14175be9c
2011-09-17 15:22:21 -07:00
Glenn Kasten
d53cae0e45 Add non-NDK internal API __pthread_gettid
Tracking bugs 5267571 and 5090073 (for deadlock detection logs).

Change-Id: Icb90f91ec1525607551c2234ef921bf88296484f
2011-09-16 12:38:28 -07:00
Erik Gilling
b8ef90d679 update linux/fb.h
Change-Id: Ib00343e3b6f95eaf3d347d4b8b9df950d0686e70
Signed-off-by: Erik Gilling <konkers@android.com>
2011-09-14 11:20:23 -07:00
Elliott Hughes
5da3ed177c Merge "Update to tzdata2011j." 2011-09-12 11:19:51 -07:00
Elliott Hughes
6ea19d7815 Update to tzdata2011j.
Affects Samoa, Kenya, Uganda, and Tanzania.

Change-Id: Ibee638d415d4f0389ff27ea1c9c481543e181f1f
2011-09-12 10:28:11 -07:00
Erik Gilling
763230ae55 update kernel video/dsscomp.h
Change-Id: Ifc4f96e3a9c3435c0b0ee80ac9da295b4e9463a1
Signed-off-by: Erik Gilling <konkers@android.com>
2011-09-07 12:53:22 -07:00
Robert Greenwalt
7f84da69f8 Add some logging of dns cache operations
Added info about what entries are getting flushed due to ttl or size limits.

Change-Id: I69fb70ce23b5b820f5f1a5738c0f1aa57b6a1127
2011-09-02 07:44:36 -07:00
Elliott Hughes
b0bbbff606 Update to tzdata2011i.
Affects South Sudan (Africa/Juba), Samoa, Europe/Kalingrad, Newfoundland,
America/Resolute, Metlakatla, America/Honolulu, America/Goose_Bay and
America/St_Johns.

Change-Id: I8e60a7c7ba5ab71eedcc66937443a9e6993accd6
2011-08-29 08:58:09 -07:00
Erik Gilling
4f3465240a Merge "update video/dsscomp.h" 2011-08-24 15:01:13 -07:00
Erik Gilling
9749753889 update video/dsscomp.h
Change-Id: If4bd1d751b30ad2e65c0bd83caba436334949463
Signed-off-by: Erik Gilling <konkers@android.com>
2011-08-24 13:33:13 -07:00
Mike Lockwood
0b33d9982e Add linux/leds-an30259a.h
Change-Id: I9144b58bdc522d6ec22466adc459a40be648592f
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-08-23 10:29:30 -04:00
David 'Digit' Turner
58246b7067 libc: Add __aeabi_f2uiz to libgcc_compat.c
This patch ensure that __aeabi_f2uiz is embedded in our C library.
This is needed to avoid breaking certain applications when they are
loaded in ICS. It is likely that the issue is due to mis-linked
binaries generated with the stand-alone toolchain (the problem
should not exist if you use ndk-build), but this fix is easier
than asking all app developers to fix their custom build system.

If you want more technical details, read the comments inside
libgcc_compat.c

Change-Id: I59ac1fc781ecb70b90b5573c5a3c67560ca8f270
2011-08-22 19:53:10 +02:00
David Turner
6dcf0d73a6 am 3dc94305: am 17a40ffb: am c57fd963: Merge "NDK: x86 header file has incorrect definition for ptrdiff_t"
* commit '3dc94305e4eb243747248b43954c499ddc96638d':
  NDK: x86 header file has incorrect definition for ptrdiff_t
2011-08-09 13:37:30 -07:00
David Turner
3afafd46f3 am 951e8381: am 3906a9c1: am f5aa1382: Merge "x86 libc: Fix the range to check the error"
* commit '951e8381916464243c7601fdb41e941811aa3773':
  x86 libc: Fix the range to check the error
2011-08-09 13:37:21 -07:00