Skip to content

Commit cf34653

Browse files
committed
More cleanup for #inclusivefixit.
Found manually with grep, since the script seems to miss stuff. Test: treehugger Change-Id: I5933cbade9792801d4a0bec1ccb077efa6ad8fbc
1 parent b1d27ca commit cf34653

File tree

9 files changed

+18
-14
lines changed

9 files changed

+18
-14
lines changed

docs/libc_assembler.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ verify that the routine is being properly tested.
1010
* Rerun the benchmarks using the updated image that uses the code for
1111
the new routine. See the [Performance](#Performance) section for details about
1212
benchmarking.
13-
* Verify that unwind information for new routine looks sane. See the [Unwind Info](#unwind-info) section for details about how to verify this.
13+
* Verify that unwind information for new routine looks correct. See
14+
the [Unwind Info](#unwind-info) section for details about how to verify this.
1415

1516
When benchmarking, it's best to verify on the latest Pixel device supported.
1617
Make sure that you benchmark both the big and little cores to verify that

libc/arch-arm/bionic/__restore.S

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,14 @@
2828

2929
#include <private/bionic_asm.h>
3030

31-
// gdb is smart enough to unwind through signal frames with just the regular
31+
// gdb is able to unwind through signal frames with just the regular
3232
// CFI information but libgcc and libunwind both need extra help. We do this
3333
// by using .fnstart/.fnend and inserting a nop before both __restore and
3434
// __restore_rt (but covered by the .fnstart/.fnend) so that although they're
3535
// not inside the functions from objdump's point of view, an unwinder that
36-
// blindly looks at the previous instruction (but is then smart enough to check
37-
// the unwind information to find out where it landed) gets the right answer.
36+
// just assumes it should look at the previous instruction (but is then smart
37+
// enough to check the unwind information to find out where it landed) gets
38+
// the right answer.
3839
// Make sure not to have both DWARF and ARM unwind information, so only
3940
// use the ARM unwind information.
4041

libc/bionic/fdsan.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ __printflike(1, 0) static void fdsan_error(const char* fmt, ...) {
137137
return;
138138
}
139139

140-
// Lots of code will (sensibly) fork, blindly call close on all of their fds,
140+
// Lots of code will (sensibly) fork, call close on all of their fds,
141141
// and then exec. Compare our cached pid value against the real one to detect
142142
// this scenario and permit it.
143143
pid_t cached_pid = __get_cached_pid();

libc/bionic/fork.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ int fork() {
5656

5757
if (result == 0) {
5858
// Disable fdsan post-fork, so we don't falsely trigger on processes that
59-
// fork, close all of their fds blindly, and then exec.
59+
// fork, close all of their fds, and then exec.
6060
android_fdsan_set_error_level(ANDROID_FDSAN_ERROR_LEVEL_DISABLED);
6161

6262
// Reset the stack_and_tls VMA name so it doesn't end with a tid from the

libc/bionic/ndk_cruft.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,9 @@ extern "C" {
5555
// By the time any NDK-built code is running, there are plenty of threads.
5656
int __isthreaded = 1;
5757

58-
// These were accidentally declared in <unistd.h> because we stupidly used to inline
59-
// getpagesize() and __getpageshift(). Needed for backwards compatibility with old NDK apps.
58+
// These were accidentally declared in <unistd.h> because we used to inline
59+
// getpagesize() and __getpageshift(). Needed for backwards compatibility
60+
// with old NDK apps.
6061
unsigned int __page_size = PAGE_SIZE;
6162
unsigned int __page_shift = 12;
6263

libc/include/android/fdsan.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,8 @@ enum android_fdsan_error_level android_fdsan_get_error_level() __INTRODUCED_IN(2
186186
* Set the error level and return the previous state.
187187
*
188188
* Error checking is automatically disabled in the child of a fork, to maintain
189-
* compatibility with code that forks, blindly closes FDs, and then execs.
189+
* compatibility with code that forks, closes all file descriptors, and then
190+
* execs.
190191
*
191192
* In cases such as the zygote, where the child has no intention of calling
192193
* exec, call this function to reenable fdsan checks.

libc/kernel/tools/cpp.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ def _getTokensWithCursors(self):
267267

268268
def parseString(self, lines):
269269
"""Parse a list of text lines into a BlockList object."""
270-
file_ = 'dummy.c'
270+
file_ = 'no-filename-available.c'
271271
self._tu = self._indexer.parse(file_, self.clang_flags,
272272
unsaved_files=[(file_, lines)],
273273
options=self.options)

libc/tools/check-symbols-glibc.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -182,9 +182,9 @@ def GetNdkIgnored(arch): # pylint: disable=redefined-outer-name
182182
'_ctype_',
183183
'__libc_init',
184184
])
185-
# POSIX has some stuff that's too stupid for words (a64l) or not actually
186-
# implemented in glibc unless you count always failing with ENOSYS as
187-
# being implemented (fattach). Other stuff (fmtmsg) isn't used in any
185+
# POSIX has some stuff that's unusable in the modern world (a64l) or not
186+
# actually implemented in glibc unless you count always failing with ENOSYS
187+
# as being implemented (fattach). Other stuff (fmtmsg) isn't used in any
188188
# codebase I have access to, internal or external.
189189
in_posix_and_glibc_but_dead_or_useless = set([
190190
'a64l', # obsolete

tests/time_test.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ TEST(time, mktime_10310929) {
142142
t.tm_mday = 10;
143143

144144
#if !defined(__LP64__)
145-
// 32-bit bionic stupidly had a signed 32-bit time_t.
145+
// 32-bit bionic has a signed 32-bit time_t.
146146
ASSERT_EQ(-1, mktime(&t));
147147
ASSERT_EQ(EOVERFLOW, errno);
148148
#else

0 commit comments

Comments
 (0)