diff options
-rwxr-xr-x | testsuite/buildok/null.stp | 5 | ||||
-rw-r--r-- | translate.cxx | 13 |
2 files changed, 12 insertions, 6 deletions
diff --git a/testsuite/buildok/null.stp b/testsuite/buildok/null.stp new file mode 100755 index 00000000..9bcaf3f6 --- /dev/null +++ b/testsuite/buildok/null.stp @@ -0,0 +1,5 @@ +#! stap -p4 + +# PR10298 +global foo = 5 +probe begin { if (foo == NULL) log("hello") } diff --git a/translate.cxx b/translate.cxx index 518e5584..cc634555 100644 --- a/translate.cxx +++ b/translate.cxx @@ -5212,18 +5212,19 @@ translate_pass (systemtap_session& s) s.op->newline(-1) << "}"; s.op->assert_0_indent(); + emit_symbol_data (s); + + s.op->newline() << "MODULE_DESCRIPTION(\"systemtap-generated probe\");"; + s.op->newline() << "MODULE_LICENSE(\"GPL\");"; + s.op->assert_0_indent(); + + // PR10298: attempt to avoid collisions with symbols for (unsigned i=0; i<s.globals.size(); i++) { s.op->newline(); s.up->emit_global_param (s.globals[i]); } s.op->assert_0_indent(); - - emit_symbol_data (s); - - s.op->newline() << "MODULE_DESCRIPTION(\"systemtap-generated probe\");"; - s.op->newline() << "MODULE_LICENSE(\"GPL\");"; - s.op->assert_0_indent(); } catch (const semantic_error& e) { |