diff options
-rw-r--r-- | NEWS | 7 | ||||
-rw-r--r-- | hash.cxx | 1 | ||||
-rw-r--r-- | runtime/loc2c-runtime.h | 6 | ||||
-rw-r--r-- | translate.cxx | 2 |
4 files changed, 15 insertions, 1 deletions
@@ -1,3 +1,10 @@ +* What's new + +- The --skip-badvars option now also suppresses run-time error + messages that would otherwise result from erroneous memory accesses. + Such accesses can originate from $context expressions fueled by + erroneous debug data, or by kernel_{long,string,...}() tapset calls. + * What's new in version 0.9.5 - New probes process().insn and process().insn.block that allows @@ -174,6 +174,7 @@ find_script_hash (systemtap_session& s, const string& script, const hash &base) h.add(s.ignore_vmlinux); // --ignore-vmlinux h.add(s.ignore_dwarf); // --ignore-dwarf h.add(s.consult_symtab); // --kelf, --kmap + h.add(s.skip_badvars); // --skip-badvars if (!s.kernel_symtab_path.empty()) // --kmap { h.add(s.kernel_symtab_path); diff --git a/runtime/loc2c-runtime.h b/runtime/loc2c-runtime.h index 16ddb950..eaf47cad 100644 --- a/runtime/loc2c-runtime.h +++ b/runtime/loc2c-runtime.h @@ -62,6 +62,10 @@ must work right for kernel addresses, and can use whatever existing machine-specific kernel macros are convenient. */ +#if STP_SKIP_BADVARS +#define DEREF_FAULT(addr) ({0; }) +#define STORE_DEREF_FAULT(addr) ({0; }) +#else #define DEREF_FAULT(addr) ({ \ snprintf(c->error_buffer, sizeof(c->error_buffer), \ "kernel read fault at 0x%p (%s)", (void *)(intptr_t)(addr), #addr); \ @@ -75,7 +79,7 @@ c->last_error = c->error_buffer; \ goto deref_fault; \ }) - +#endif #if defined (STAPCONF_X86_UNIREGS) && defined (__i386__) diff --git a/translate.cxx b/translate.cxx index 47fffd1e..9085349e 100644 --- a/translate.cxx +++ b/translate.cxx @@ -4955,6 +4955,8 @@ translate_pass (systemtap_session& s) s.op->newline() << "#define STP_OVERLOAD"; s.op->newline() << "#endif"; + s.op->newline() << "#define STP_SKIP_BADVARS " << (s.skip_badvars ? 1 : 0); + if (s.bulk_mode) s.op->newline() << "#define STP_BULKMODE"; |