aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2020-07-31 10:35:03 -0700
committerElliott Hughes <enh@google.com>2020-07-31 10:35:03 -0700
commitcf346532fccbe35666b827fbbfd2cb951dd00dc2 (patch)
treec1ab59c29e63dea1700f24edb6bfad28c9d0687f
parentb1d27cab96c7aa31470ed2a1a8b284f9422cef25 (diff)
downloadbionic-cf346532fccbe35666b827fbbfd2cb951dd00dc2.tar.gz
More cleanup for #inclusivefixit.
Found manually with grep, since the script seems to miss stuff. Test: treehugger Change-Id: I5933cbade9792801d4a0bec1ccb077efa6ad8fbc
-rw-r--r--docs/libc_assembler.md3
-rw-r--r--libc/arch-arm/bionic/__restore.S7
-rw-r--r--libc/bionic/fdsan.cpp2
-rw-r--r--libc/bionic/fork.cpp2
-rw-r--r--libc/bionic/ndk_cruft.cpp5
-rw-r--r--libc/include/android/fdsan.h3
-rwxr-xr-xlibc/kernel/tools/cpp.py2
-rwxr-xr-xlibc/tools/check-symbols-glibc.py6
-rw-r--r--tests/time_test.cpp2
9 files changed, 18 insertions, 14 deletions
diff --git a/docs/libc_assembler.md b/docs/libc_assembler.md
index 44c00366d..43bcfc753 100644
--- a/docs/libc_assembler.md
+++ b/docs/libc_assembler.md
@@ -10,7 +10,8 @@ verify that the routine is being properly tested.
* Rerun the benchmarks using the updated image that uses the code for
the new routine. See the [Performance](#Performance) section for details about
benchmarking.
-* Verify that unwind information for new routine looks sane. See the [Unwind Info](#unwind-info) section for details about how to verify this.
+* Verify that unwind information for new routine looks correct. See
+the [Unwind Info](#unwind-info) section for details about how to verify this.
When benchmarking, it's best to verify on the latest Pixel device supported.
Make sure that you benchmark both the big and little cores to verify that
diff --git a/libc/arch-arm/bionic/__restore.S b/libc/arch-arm/bionic/__restore.S
index 8c1e41d53..529174398 100644
--- a/libc/arch-arm/bionic/__restore.S
+++ b/libc/arch-arm/bionic/__restore.S
@@ -28,13 +28,14 @@
#include <private/bionic_asm.h>
-// gdb is smart enough to unwind through signal frames with just the regular
+// gdb is able to unwind through signal frames with just the regular
// CFI information but libgcc and libunwind both need extra help. We do this
// by using .fnstart/.fnend and inserting a nop before both __restore and
// __restore_rt (but covered by the .fnstart/.fnend) so that although they're
// not inside the functions from objdump's point of view, an unwinder that
-// blindly looks at the previous instruction (but is then smart enough to check
-// the unwind information to find out where it landed) gets the right answer.
+// just assumes it should look at the previous instruction (but is then smart
+// enough to check the unwind information to find out where it landed) gets
+// the right answer.
// Make sure not to have both DWARF and ARM unwind information, so only
// use the ARM unwind information.
diff --git a/libc/bionic/fdsan.cpp b/libc/bionic/fdsan.cpp
index 4b8991872..043510c63 100644
--- a/libc/bionic/fdsan.cpp
+++ b/libc/bionic/fdsan.cpp
@@ -137,7 +137,7 @@ __printflike(1, 0) static void fdsan_error(const char* fmt, ...) {
return;
}
- // Lots of code will (sensibly) fork, blindly call close on all of their fds,
+ // Lots of code will (sensibly) fork, call close on all of their fds,
// and then exec. Compare our cached pid value against the real one to detect
// this scenario and permit it.
pid_t cached_pid = __get_cached_pid();
diff --git a/libc/bionic/fork.cpp b/libc/bionic/fork.cpp
index 3814ed0ac..982ba95cb 100644
--- a/libc/bionic/fork.cpp
+++ b/libc/bionic/fork.cpp
@@ -56,7 +56,7 @@ int fork() {
if (result == 0) {
// Disable fdsan post-fork, so we don't falsely trigger on processes that
- // fork, close all of their fds blindly, and then exec.
+ // fork, close all of their fds, and then exec.
android_fdsan_set_error_level(ANDROID_FDSAN_ERROR_LEVEL_DISABLED);
// Reset the stack_and_tls VMA name so it doesn't end with a tid from the
diff --git a/libc/bionic/ndk_cruft.cpp b/libc/bionic/ndk_cruft.cpp
index e9a5b5b79..b15a3171f 100644
--- a/libc/bionic/ndk_cruft.cpp
+++ b/libc/bionic/ndk_cruft.cpp
@@ -55,8 +55,9 @@ extern "C" {
// By the time any NDK-built code is running, there are plenty of threads.
int __isthreaded = 1;
-// These were accidentally declared in <unistd.h> because we stupidly used to inline
-// getpagesize() and __getpageshift(). Needed for backwards compatibility with old NDK apps.
+// These were accidentally declared in <unistd.h> because we used to inline
+// getpagesize() and __getpageshift(). Needed for backwards compatibility
+// with old NDK apps.
unsigned int __page_size = PAGE_SIZE;
unsigned int __page_shift = 12;
diff --git a/libc/include/android/fdsan.h b/libc/include/android/fdsan.h
index 83b9318ba..e23de85d3 100644
--- a/libc/include/android/fdsan.h
+++ b/libc/include/android/fdsan.h
@@ -186,7 +186,8 @@ enum android_fdsan_error_level android_fdsan_get_error_level() __INTRODUCED_IN(2
* Set the error level and return the previous state.
*
* Error checking is automatically disabled in the child of a fork, to maintain
- * compatibility with code that forks, blindly closes FDs, and then execs.
+ * compatibility with code that forks, closes all file descriptors, and then
+ * execs.
*
* In cases such as the zygote, where the child has no intention of calling
* exec, call this function to reenable fdsan checks.
diff --git a/libc/kernel/tools/cpp.py b/libc/kernel/tools/cpp.py
index b6a153881..8538eb006 100755
--- a/libc/kernel/tools/cpp.py
+++ b/libc/kernel/tools/cpp.py
@@ -267,7 +267,7 @@ class CppTokenizer(object):
def parseString(self, lines):
"""Parse a list of text lines into a BlockList object."""
- file_ = 'dummy.c'
+ file_ = 'no-filename-available.c'
self._tu = self._indexer.parse(file_, self.clang_flags,
unsaved_files=[(file_, lines)],
options=self.options)
diff --git a/libc/tools/check-symbols-glibc.py b/libc/tools/check-symbols-glibc.py
index 4de018101..d8d198262 100755
--- a/libc/tools/check-symbols-glibc.py
+++ b/libc/tools/check-symbols-glibc.py
@@ -182,9 +182,9 @@ known = set([
'_ctype_',
'__libc_init',
])
-# POSIX has some stuff that's too stupid for words (a64l) or not actually
-# implemented in glibc unless you count always failing with ENOSYS as
-# being implemented (fattach). Other stuff (fmtmsg) isn't used in any
+# POSIX has some stuff that's unusable in the modern world (a64l) or not
+# actually implemented in glibc unless you count always failing with ENOSYS
+# as being implemented (fattach). Other stuff (fmtmsg) isn't used in any
# codebase I have access to, internal or external.
in_posix_and_glibc_but_dead_or_useless = set([
'a64l', # obsolete
diff --git a/tests/time_test.cpp b/tests/time_test.cpp
index 74d691dc9..5a977c26c 100644
--- a/tests/time_test.cpp
+++ b/tests/time_test.cpp
@@ -142,7 +142,7 @@ TEST(time, mktime_10310929) {
t.tm_mday = 10;
#if !defined(__LP64__)
- // 32-bit bionic stupidly had a signed 32-bit time_t.
+ // 32-bit bionic has a signed 32-bit time_t.
ASSERT_EQ(-1, mktime(&t));
ASSERT_EQ(EOVERFLOW, errno);
#else