Fix a race condition in the example, and add a linearized version to
make it more clear what's going on.
Test: none
Change-Id: Id9158e4fd407b676ef364e7076985de3ad477457
This change adds a 128-bit magic value just before the abort message
(and its length). This allows Chrome OS crash collector (which cannot
reliably correlate a crash with its corresponding tombstone) to extract
the abort message from the core dump.
Bug: 62387553
Test: /data/nativetest{,64}/debuggerd_test/*
Test: /data/nativetest{,64}/bionic-unit-tests{,-static}/*
Change-Id: I69ff021d773b3a10081ab16ddf6f23233320fb02
There's TLS space used for unknown errno values, and a call to printf
shouldn't clobber that. No-one will ever hit this in real life, but
since it's easily fixed...
Bug: http://b/112776560
Test: ran tests
Change-Id: I8c2437f2e5214e652119791d4e162a197b049d5b
Allows ART JIT use membarrier to invalidate instruction
pipelines.
Bug: 66095511
Test: bionic-unit-tests
Change-Id: I8cf83929f00baf5a3c440a899d2667a992bda8e2
HWASan needs to re-tag the newly unallocated stack space to match SP.
Bug: 112438058
Test: SANITIZE_TARGET=hwaddress
Change-Id: I4dddef542d802d63bdea59e32a03425a2c4f870b
Historically we haven't documented many behavioral changes, but it's
probably useful to record that information before it's lost (even if,
long term, it might be more useful in the man pages or the doc comments).
Bug: N/A
Test: N/A
Change-Id: Iaa4f651fd6576298d848894b61285ef95879deb9
Netd looping connections to itself via the libnetd_client connect()
wrapper has always unintended, although it worked until now. Once we
move the resolver into netd, the frequency of connect() calls will
increase, which makes it less acceptable.
There are several ways to detect if the calling process is netd.
Checking both uid == 0 and the argv[0] == netd makes it hard for
non-system components to spoof as netd.
Test: flash a device and check that netd logs the "Skipping..." message
Test: atest netd_integration_test
Change-Id: I9506facb4aa3094b16a98a913a1e2394056ce91a
Also fix formatting of "What's in libc/?" section, and remove obsolete
include/machine.
Also unify # vs --- syntax.
Bug: N/A
Test: N/A
Change-Id: I6a7a2828e700d5e03c7209f55691278326230bd1
This allows compiler optimize both calls to a single frinti.
Test: Builds, ran unit tests on arm64.
Change-Id: Ie59ac11a419281836a8051ecda26a5c7b72f3dea
Convert abort's inline_tgkill to do the equivalent of
pthread_sigqueue(pthread_self(), ...), so that we can use it in fdsan
as well.
Test: bionic-unit-tests
Test: debuggerd_test32
Test: debuggerd_test64
Change-Id: I92a7b84e2f00ce021b4043ed8a3bd8683d77fe9c
Conditional branch has limited range (1MB) and can not be extended by
the linker. The current distance (in walleye build) is 500KB, about
half of the maximum. HWASan pushes it over the limit.
Replace conditional branch with regular branch, which has longer
range (26 vs 19 bits offset) and can be extended in the linker if
needed.
Bug: 112437884
Bug: 12231437
Test: SANITIZE_TARGET=hwaddress
Change-Id: Idc083fb557ab3a859541beb009809992406a6703
I don't think we want to *document* this, but since at least
external/curl/lib/select.c is relying on this, we should be careful not
to break it.
Bug: http://b/111850071
Test: ran tests
Change-Id: Ic877250d755a0cb59e77ae38ae5e3949f753dad6
* Some callers, e.g. external/curl/lib/select.c, do
poll(NULL, 0, ...) and get clang-diagnostic-nonnull check error.
Test: build with WITH_TIDY=1
Bug: 111850071
Change-Id: I7ea433d185cb84011a954f05964181b5518febd4
* changes:
fdsan: provide abort message in warning tombstones.
Implement pthread_sigqueue.
Stringify api_level in <android/versioning.h>.
Delete archaic pre-ANSI C support.
In particular, document the fact that they only affect the calling thread
on Android.
Bug: http://b/13134174
Test: ran tests
Change-Id: Ica6af451400d47e24358f59495ded63b2110eb8b