diff options
author | Frank Ch. Eigler <fche@elastic.org> | 2009-04-01 22:50:47 -0400 |
---|---|---|
committer | Frank Ch. Eigler <fche@elastic.org> | 2009-04-01 22:52:33 -0400 |
commit | dcfd7fed7088871f46d9da7183e485877fb2d81f (patch) | |
tree | 57a560603d3b095a9f3f2bc01500becdacf785d9 /runtime/loc2c-runtime.h | |
parent | 65ffc3f32328473cb74aa5c7eca7e46bb82bd7fb (diff) | |
download | systemtap-steved-dcfd7fed7088871f46d9da7183e485877fb2d81f.tar.gz systemtap-steved-dcfd7fed7088871f46d9da7183e485877fb2d81f.tar.xz systemtap-steved-dcfd7fed7088871f46d9da7183e485877fb2d81f.zip |
PR10019: --skip-badvars to suppress run-time memory errors too
* NEWS: Note this change.
* hash.cxx (find_script_hash): Add s.skip_badvars into hash.
* translate.cxx (translate_pass): Emit STP_SKIP_BADVARS.
* runtime/loc2c-runtime.h (DEREF_FAULT, STORE_DEREF_FAULT): Provide
dummy implementation if STP_SKIP_BADVARS.
Diffstat (limited to 'runtime/loc2c-runtime.h')
-rw-r--r-- | runtime/loc2c-runtime.h | 6 |
1 files changed, 5 insertions, 1 deletions
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__) |