History log of /bionic/libc/stdio/findfp.c
Revision Date Author Comments
61e699a133a4807fe878a6cb0d7190d7c96e21f8 12-Jun-2013 Elliott Hughes <enh@google.com> Clean up abort.

* A dlmalloc usage error shouldn't call abort(3) because we want to
cause a SIGSEGV by writing the address dlmalloc didn't like to an
address the kernel won't like, so that debuggerd will dump the
memory around the address that upset dlmalloc.

* Switch to the simpler FreeBSD/NetBSD style of registering stdio
cleanup. Hopefully this will let us simplify more of the stdio
implementation.

* Clear the stdio cleanup handler before we abort because of a dlmalloc
corruption error. This fixes the reported bug, where we'd hang inside
dlmalloc because the stdio cleanup reentered dlmalloc.

Bug: 9301265
Change-Id: Ief31b389455d6876e5a68f0f5429567d37277dbc
9831ad3ce6bd5b22da16a275ed67e7236eae3d1f 29-Aug-2011 David 'Digit' Turner <digit@google.com> libc: speed-up flockfile()/funlockfile()

For Honeycomb, we added proper file thread-safety for
all FILE* operations. However, we did implement that by
using an out-of-band hash table to map FILE* pointers
to phtread_mutex_t mutexes, because we couldn't change
the size of 'struct _sFILE' without breaking the ABI.

It turns out that our BSD-derived code already has
some support code to extend FILE* objects, so use it
instead. See libc/stdio/fileext.h

This patch gets rid of the hash table, and put the
mutex directly into the sFILE extension.

Change-Id: If1c3fe0a0a89da49c568e9a7560b7827737ff4d0
f582340a6a48588aa50da17e1620e8f91b146941 12-Feb-2011 Kenny Root <kroot@google.com> Fix the handle locking in stdio

Fix the handle locking in stdio to use flockfile/funlockfile
internally when and where required. Macros in <stdio.h> are updated
to automatically call the underlying functions when the process is
threaded to obtain the necessary locking. A private mutex is added
to protect __sglue, the internal list of FILE handles, and another
to protect the one-time initialization. Some routines in libc that
use getc() change to use getc_unlocked() as they're either protected
by their own lock or aren't thread-safe routines anyway.

Based on OpenBSD change by guenther@openbsd.org
http://www.mail-archive.com/source-changes@cvs.openbsd.org/msg01015.html

Bug: 3446659
Change-Id: Ie82116e358c541718d6709ec45ca6796be5a007b
b4867734b06a18494976934c6f33ff2549595e3f 14-Oct-2010 Jim Huang <jserv@0xlab.org> stdio: make internal symbols static/hidden

Although header libc/stdio/local.h declares the macros and private
variables of stdio, there are several internal symbols exposed
unexpectedly.

Change-Id: Ie7a07f85b70322fb9cd05b3c8e1bcc416061eb4b
a910abcd194830d2d113b3e183eb7df4d36cd92e 31-Jan-2010 André Goddard Rosa <andre.goddard@gmail.com> improve readability of stdio: fix indentation and remove trailing spaces

Change-Id: Ic51e58a7c75d20bf770dc0ebd7f97a338fbe0036
Signed-off-by: André Goddard Rosa <andre.goddard@gmail.com>
1dc9e472e19acfe6dc7f41e429236e7eef7ceda1 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
1767f908af327fa388b1c66883760ad851267013 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
a27d2baa0c1a2ec70f47ea9199b1dd6762c8a349 21-Oct-2008 The Android Open Source Project <initial-contribution@android.com> Initial Contribution