PRINT("sys_syslog (%d, %p, %d)", ARG1,ARG2,ARG3);
PRE_REG_READ3(long, "syslog", int, type, char *, bufp, int, len);
switch (ARG1) {
+ // The kernel uses magic numbers here, rather than named constants,
+ // therefore so do we.
case 2: case 3: case 4:
PRE_MEM_WRITE( "syslog(bufp)", ARG2, ARG3);
break;
case DW_LNE_set_address:
/* XXX: Pointer size could be 8 */
+ // (and there may be other 32-bit assumptions within this file?
+ // not sure... --njn)
vg_assert(pointer_size == 4);
adr = *((Addr *)data);
if (0) VG_(printf)("smr.a := %p\n", adr );
vg_assert(tid_main == 1);
VG_(threads)[tid_main].status = VgTs_Runnable;
- VG_(threads)[tid_main].stack_highest_word = VG_(clstk_end) - 4;
+ VG_(threads)[tid_main].stack_highest_word = VG_(clstk_end) - sizeof(UWord);
VG_(threads)[tid_main].stack_base = VG_(clstk_base);
VG_(threads)[tid_main].stack_size = VG_(client_rlimit_stack).rlim_cur;
VG_(threads)[tid].stack_size = new_stk_szb;
VG_(threads)[tid].stack_highest_word
= new_stack + new_stk_szb
- - VG_AR_CLIENT_STACKBASE_REDZONE_SZB; /* -4 ??? */;
+ - VG_AR_CLIENT_STACKBASE_REDZONE_SZB; /* - sizeof(UWord) ??? */;
}
/* Having got memory to hold the thread's stack:
// Core dumping is disabled until someone can work out how to abstract out
// the arch-specific and word-size-specific parts neatly.
+//
+// Note that the code below is not 64-bit clean!
+//
#if 0
/*
Dump core