From: Paul Floyd Date: Sun, 3 Nov 2024 09:55:57 +0000 (+0100) Subject: Correct typos and spelling mistakes X-Git-Tag: VALGRIND_3_25_0~259 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=dc1276745ffaa413ee3d3780ea7a048a8c6d7079;p=thirdparty%2Fvalgrind.git Correct typos and spelling mistakes --- diff --git a/NEWS.old b/NEWS.old index 2b43c91fa..919b85c39 100644 --- a/NEWS.old +++ b/NEWS.old @@ -14,7 +14,7 @@ AMD64/macOS 10.13 and nanoMIPS/Linux. Rust v0 name demangling. [Update: alas, due to a bug, this support isn't working in 3.18.0.] -* __libc_freeres isn't called anymore after the program recieves a +* __libc_freeres isn't called anymore after the program receives a fatal signal. Causing some internal glibc resources to hang around, but preventing any crashes after the program has ended. diff --git a/VEX/priv/guest_ppc_toIR.c b/VEX/priv/guest_ppc_toIR.c index 94930aa1c..18716dd04 100644 --- a/VEX/priv/guest_ppc_toIR.c +++ b/VEX/priv/guest_ppc_toIR.c @@ -6149,13 +6149,13 @@ static IRExpr* dnorm_adj_Vector ( IRExpr* src ) *------------------------------------------------------------*/ static ULong generate_TMreason( UInt failure_code, - UInt persistant, + UInt persistent, UInt nest_overflow, UInt tm_exact ) { ULong tm_err_code = ( (ULong) 0) << (63-6) /* Failure code */ - | ( (ULong) persistant) << (63-7) /* Failure persistant */ + | ( (ULong) persistent) << (63-7) /* Failure persistent */ | ( (ULong) 0) << (63-8) /* Disallowed */ | ( (ULong) nest_overflow) << (63-9) /* Nesting Overflow */ | ( (ULong) 0) << (63-10) /* Footprint Overflow */ @@ -7691,7 +7691,7 @@ static Bool dis_int_misc ( UInt prefix, UInt theInstr ) * * 0b00 Resume instruction fetching and execution when an * exception or an event-based branch exception occurs, - * or a resume signal from the platform is recieved. + * or a resume signal from the platform is received. * * 0b01 Reserved. * @@ -33735,7 +33735,7 @@ static Bool dis_transactional_memory ( UInt prefix, UInt theInstr, UInt nextInst UInt failure_code = 0; /* Forcing failure, will not be due to tabort * or treclaim. */ - UInt persistant = 1; /* set persistant since we are always failing + UInt persistent = 1; /* set persistent since we are always failing * the tbegin. */ UInt nest_overflow = 1; /* Alowed nesting depth overflow, we use this @@ -33759,7 +33759,7 @@ static Bool dis_transactional_memory ( UInt prefix, UInt theInstr, UInt nextInst */ putCR321( 0, mkU8( 0x2 ) ); - tm_reason = generate_TMreason( failure_code, persistant, + tm_reason = generate_TMreason( failure_code, persistent, nest_overflow, tm_exact ); storeTMfailure( guest_CIA_curr_instr, tm_reason, diff --git a/VEX/priv/host_generic_reg_alloc2.c b/VEX/priv/host_generic_reg_alloc2.c index d94d2c92a..b731720f2 100644 --- a/VEX/priv/host_generic_reg_alloc2.c +++ b/VEX/priv/host_generic_reg_alloc2.c @@ -494,7 +494,7 @@ HInstrArray* doRegisterAllocation_v2 ( rreg_lrs_la = LibVEX_Alloc_inline(rreg_lrs_size * sizeof(RRegLR)); rreg_lrs_db = NULL; /* we'll create this later */ - /* We'll need to track live range start/end points seperately for + /* We'll need to track live range start/end points separately for each rreg. Sigh. */ vassert(n_rregs > 0); rreg_live_after = LibVEX_Alloc_inline(n_rregs * sizeof(Int)); diff --git a/VEX/pub/libvex_ir.h b/VEX/pub/libvex_ir.h index f6f347a05..2d09e37cb 100644 --- a/VEX/pub/libvex_ir.h +++ b/VEX/pub/libvex_ir.h @@ -2198,7 +2198,7 @@ struct _IRExpr { It is important to get the array size/type exactly correct since IR optimisation looks closely at such info in order to - establish aliasing/non-aliasing between seperate GetI and + establish aliasing/non-aliasing between separate GetI and PutI events, which is used to establish when they can be reordered, etc. Putting incorrect info in will lead to obscure IR optimisation bugs. diff --git a/coregrind/m_hashtable.c b/coregrind/m_hashtable.c index 586cfcc4f..6fa07c29f 100644 --- a/coregrind/m_hashtable.c +++ b/coregrind/m_hashtable.c @@ -234,21 +234,21 @@ void* VG_(HT_gen_remove) ( VgHashTable *table, const void* node, HT_Cmp_t cmp ) void VG_(HT_print_stats) ( const VgHashTable *table, HT_Cmp_t cmp ) { #define MAXOCCUR 20 - UInt elt_occurences[MAXOCCUR+1]; - UInt key_occurences[MAXOCCUR+1]; - UInt cno_occurences[MAXOCCUR+1]; - /* Key occurence : how many ht elements have the same key. - elt_occurences : how many elements are inserted multiple time. - cno_occurences : how many chains have that length. - The last entry in these arrays collects all occurences >= MAXOCCUR. */ + UInt elt_occurrences[MAXOCCUR+1]; + UInt key_occurrences[MAXOCCUR+1]; + UInt cno_occurrences[MAXOCCUR+1]; + /* Key occurrence : how many ht elements have the same key. + elt_occurrences : how many elements are inserted multiple time. + cno_occurrences : how many chains have that length. + The last entry in these arrays collects all occurrences >= MAXOCCUR. */ #define INCOCCUR(occur,n) (n >= MAXOCCUR ? occur[MAXOCCUR]++ : occur[n]++) UInt i; UInt nkey, nelt, ncno; VgHashNode *cnode, *node; - VG_(memset)(key_occurences, 0, sizeof(key_occurences)); - VG_(memset)(elt_occurences, 0, sizeof(elt_occurences)); - VG_(memset)(cno_occurences, 0, sizeof(cno_occurences)); + VG_(memset)(key_occurrences, 0, sizeof(key_occurrences)); + VG_(memset)(elt_occurrences, 0, sizeof(elt_occurrences)); + VG_(memset)(cno_occurrences, 0, sizeof(cno_occurrences)); // Note that the below algorithm is quadractic in nr of elements in a chain // but if that happens, the hash table/function is really bad and that @@ -264,13 +264,13 @@ void VG_(HT_print_stats) ( const VgHashTable *table, HT_Cmp_t cmp ) if (node->key == cnode->key) nkey++; } - // If cnode->key not in a previous node, count occurences of key. + // If cnode->key not in a previous node, count occurrences of key. if (nkey == 0) { for (node = cnode; node != NULL; node = node->next) { if (node->key == cnode->key) nkey++; } - INCOCCUR(key_occurences, nkey); + INCOCCUR(key_occurrences, nkey); } nelt = 0; @@ -281,7 +281,7 @@ void VG_(HT_print_stats) ( const VgHashTable *table, HT_Cmp_t cmp ) nelt++; } } - // If cnode element not in a previous node, count occurences of elt. + // If cnode element not in a previous node, count occurrences of elt. if (nelt == 0) { for (node = cnode; node != NULL; node = node->next) { if (node->key == cnode->key @@ -289,10 +289,10 @@ void VG_(HT_print_stats) ( const VgHashTable *table, HT_Cmp_t cmp ) nelt++; } } - INCOCCUR(elt_occurences, nelt); + INCOCCUR(elt_occurrences, nelt); } } - INCOCCUR(cno_occurences, ncno); + INCOCCUR(cno_occurrences, ncno); } VG_(message)(Vg_DebugMsg, @@ -302,23 +302,23 @@ void VG_(HT_print_stats) ( const VgHashTable *table, HT_Cmp_t cmp ) " N-plicated elts\n"); nkey = nelt = ncno = 0; for (i = 0; i <= MAXOCCUR; i++) { - if (elt_occurences[i] > 0 - || key_occurences[i] > 0 - || cno_occurences[i] > 0) + if (elt_occurrences[i] > 0 + || key_occurrences[i] > 0 + || cno_occurrences[i] > 0) VG_(message)(Vg_DebugMsg, "%s=%2u : nr chain %6u, nr keys %6u, nr elts %6u\n", i == MAXOCCUR ? ">" : "N", i, - cno_occurences[i], key_occurences[i], elt_occurences[i]); - nkey += key_occurences[i]; - nelt += elt_occurences[i]; - ncno += cno_occurences[i]; + cno_occurrences[i], key_occurrences[i], elt_occurrences[i]); + nkey += key_occurrences[i]; + nelt += elt_occurrences[i]; + ncno += cno_occurrences[i]; } VG_(message)(Vg_DebugMsg, "total nr of unique slots: %6u, keys %6u, elts %6u." " Avg chain len %3.1f\n", ncno, nkey, nelt, - (Double)nelt/(Double)(ncno == cno_occurences[0] ? - 1 : ncno - cno_occurences[0])); + (Double)nelt/(Double)(ncno == cno_occurrences[0] ? + 1 : ncno - cno_occurrences[0])); } diff --git a/coregrind/m_replacemalloc/vg_replace_malloc.c b/coregrind/m_replacemalloc/vg_replace_malloc.c index 4125479b8..aff2d27b3 100644 --- a/coregrind/m_replacemalloc/vg_replace_malloc.c +++ b/coregrind/m_replacemalloc/vg_replace_malloc.c @@ -138,7 +138,7 @@ Anything "user-defined" or "class-specific" we can't know about and the user needs to use memory pool annotation. - "non-alocating placement" as the name implies does not + "non-allocating placement" as the name implies does not allocate. Placement deletes are no-ops. */ diff --git a/coregrind/m_syswrap/syswrap-freebsd.c b/coregrind/m_syswrap/syswrap-freebsd.c index f5516420f..6058bbe83 100644 --- a/coregrind/m_syswrap/syswrap-freebsd.c +++ b/coregrind/m_syswrap/syswrap-freebsd.c @@ -2007,7 +2007,7 @@ PRE(sys___sysctl) * downwards). Without any special handling this would return the * address of the host userstack. We have created a stack for the * guest (in aspacemgr) and that is the one that we want the guest - * to see. Aspacemgr is setup in m_main.c with the adresses and sizes + * to see. Aspacemgr is setup in m_main.c with the addresses and sizes * saved to file static variables in that file, so we call * VG_(get_usrstack)() to retrieve them from there. */ diff --git a/coregrind/m_syswrap/syswrap-linux.c b/coregrind/m_syswrap/syswrap-linux.c index eec838822..177712117 100644 --- a/coregrind/m_syswrap/syswrap-linux.c +++ b/coregrind/m_syswrap/syswrap-linux.c @@ -560,7 +560,7 @@ static SysRes setup_child_tls (ThreadId ctid, Addr tlsaddr) { static const Bool debug = False; ThreadState* ctst = VG_(get_ThreadState)(ctid); - // res is succesful by default, overriden if a real syscall is needed/done. + // res is successful by default, overriden if a real syscall is needed/done. SysRes res = VG_(mk_SysRes_Success)(0); if (debug) diff --git a/coregrind/vgdb.c b/coregrind/vgdb.c index 786ead160..d6740aecd 100644 --- a/coregrind/vgdb.c +++ b/coregrind/vgdb.c @@ -1167,7 +1167,7 @@ static void count_len(char delim, char *buf, size_t *len) If speaking with GDB, early_exit will ensure the GDB user sees the error messages produced by vgdb: early_exit should be used when vgdb exits due to an early error i.e. - error during arg processing, before it could succesfully process the + error during arg processing, before it could successfully process the first packet from GDB. early_exit will then read the first packet send by GDB (i.e. the qSupported packet) and will reply to it with an error and then exit. diff --git a/docs/internals/Darwin-debug.txt b/docs/internals/Darwin-debug.txt index 5bc9b5663..705d6d57d 100644 --- a/docs/internals/Darwin-debug.txt +++ b/docs/internals/Darwin-debug.txt @@ -58,5 +58,5 @@ gets set for core and tool preloads (the equivalent of LD_PRELOAD). DYLD_SHARED_REGION gets set to "avoid" (but note that for macOS 11 Big Sur and later "avoid" is no longer an option). -The Darwin calstack is a bit simpler to synthesise than the ones on +The Darwin callstack is a bit simpler to synthesise than the ones on ELF platforms. There is no auxiliary vector (auxv) to construct. diff --git a/docs/internals/threads-syscalls-signals.txt b/docs/internals/threads-syscalls-signals.txt index 5a083c122..9b4913544 100644 --- a/docs/internals/threads-syscalls-signals.txt +++ b/docs/internals/threads-syscalls-signals.txt @@ -122,7 +122,7 @@ set of signals while the signal is being delivered. Valgrind's handlers block all signals, so there's no risk of a new signal being delivered to the same thread until the old handler has finished. -The other is that if the thread which recieves the signal is not running +The other is that if the thread which receives the signal is not running (ie, doesn't hold the run_sema, which implies it must be waiting for a syscall to complete), then the signal handler will grab the run_sema before making any global state changes. Since the only time we can get diff --git a/helgrind/hg_main.c b/helgrind/hg_main.c index bbf95c0ba..5cdabb112 100644 --- a/helgrind/hg_main.c +++ b/helgrind/hg_main.c @@ -5328,7 +5328,7 @@ Bool hg_handle_client_request ( ThreadId tid, UWord* args, UWord* ret) gnat_dmmls_INIT(); /* Similar loop as for master completed hook below, but stops at - the first matching occurence, only comparing master and + the first matching occurrence, only comparing master and dependent. */ for (n = VG_(sizeXA) (gnat_dmmls) - 1; n >= 0; n--) { GNAT_dmml *dmml = (GNAT_dmml*) VG_(indexXA)(gnat_dmmls, n); diff --git a/include/pub_tool_libcproc.h b/include/pub_tool_libcproc.h index 24f037cce..49c10dae2 100644 --- a/include/pub_tool_libcproc.h +++ b/include/pub_tool_libcproc.h @@ -104,7 +104,7 @@ extern UInt VG_(read_millisecond_timer) ( void ); extern Int VG_(gettimeofday)(struct vki_timeval *tv, struct vki_timezone *tz); # if defined(VGO_linux) || defined(VGO_solaris) || defined(VGO_freebsd) -/* Get the clock value as specified by clk_id. Asserts if unsuccesful. */ +/* Get the clock value as specified by clk_id. Asserts if unsuccessful. */ extern void VG_(clock_gettime)(struct vki_timespec *ts, vki_clockid_t clk_id); # elif defined(VGO_darwin) /* It seems clock_gettime is only available on recent Darwin versions. diff --git a/memcheck/docs/mc-manual.xml b/memcheck/docs/mc-manual.xml index 981ce710f..4eee0bd33 100644 --- a/memcheck/docs/mc-manual.xml +++ b/memcheck/docs/mc-manual.xml @@ -467,7 +467,7 @@ as "silly arguments" and no back-trace was included. - Realloc size zero diff --git a/memcheck/mc_main.c b/memcheck/mc_main.c index abd5d6888..626d481d2 100644 --- a/memcheck/mc_main.c +++ b/memcheck/mc_main.c @@ -6329,7 +6329,7 @@ static void mc_print_usage(void) " --keep-stacktraces=alloc|free|alloc-and-free|alloc-then-free|none\n" " stack trace(s) to keep for malloc'd/free'd areas [alloc-and-free]\n" " --show-mismatched-frees=no|yes show frees that don't match the allocator? [yes]\n" -" --show-realloc-size-zero=no|yes show realocs with a size of zero? [yes]\n" +" --show-realloc-size-zero=no|yes show reallocs with a size of zero? [yes]\n" ); } diff --git a/memcheck/tests/realloc_size_zero.supp b/memcheck/tests/realloc_size_zero.supp index 42e5f8d81..229e9abd9 100644 --- a/memcheck/tests/realloc_size_zero.supp +++ b/memcheck/tests/realloc_size_zero.supp @@ -1,5 +1,5 @@ { - Test for realoc zero suppression + Test for realloc zero suppression Memcheck:ReallocZero fun:realloc fun:main diff --git a/none/tests/s390x/vector.h b/none/tests/s390x/vector.h index b19c3465f..23ae1e938 100644 --- a/none/tests/s390x/vector.h +++ b/none/tests/s390x/vector.h @@ -174,7 +174,7 @@ void randomize_memory_pool() [{r,m}_arg2] -- integer arg2 [{r,m}_arg3] -- integer arg3 [{r,m}_result] -- integer result - [{r,m}_memory_pool] -- address of random memory pool. Usefull for some instructions + [{r,m}_memory_pool] -- address of random memory pool. Useful for some instructions */ @@ -291,7 +291,7 @@ __attribute__((unused)) static void test_##insn() \ } /* Stores CC to %[r_result]. - Usefull when testing instructions which modify condition code. + Useful when testing instructions which modify condition code. */ #define S390_TEST_PUT_CC_TO_RESULT "ipm %[r_result] \n srl %[r_result], 28 \n" diff --git a/none/tests/solaris/coredump_many_segments.c b/none/tests/solaris/coredump_many_segments.c index da3f4ae05..6fbe8b028 100644 --- a/none/tests/solaris/coredump_many_segments.c +++ b/none/tests/solaris/coredump_many_segments.c @@ -191,7 +191,7 @@ int main(int argc, const char *argv[]) size_t sum = sum_ranges(ranges); if (sum < SEGMENTS * page_size) { - fprintf(stderr, "Free (virtual) address space cannot accomodate " + fprintf(stderr, "Free (virtual) address space cannot accommodate " "%u pages.\n", SEGMENTS); return 1; }