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.
*------------------------------------------------------------*/
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 */
*
* 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.
*
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
*/
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,
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));
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.
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
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;
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
nelt++;
}
}
- INCOCCUR(elt_occurences, nelt);
+ INCOCCUR(elt_occurrences, nelt);
}
}
- INCOCCUR(cno_occurences, ncno);
+ INCOCCUR(cno_occurrences, ncno);
}
VG_(message)(Vg_DebugMsg,
" 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]));
}
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.
*/
* 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.
*/
{
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)
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.
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.
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
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);
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.
</sect2>
-<sect2 id="mc-manual.realocsizezero"
+<sect2 id="mc-manual.reallocsizezero"
xreflabel="Realloc size zero">
<title>Realloc size zero</title>
" --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"
);
}
{
- Test for realoc zero suppression
+ Test for realloc zero suppression
Memcheck:ReallocZero
fun:realloc
fun:main
[{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
*/
}
/* 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"
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;
}