Skip to content

Instantly share code, notes, and snippets.

@agentzh
Created June 13, 2020 22:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save agentzh/24b1e2370f5bf7a4415105dc6bd16f0e to your computer and use it in GitHub Desktop.
Save agentzh/24b1e2370f5bf7a4415105dc6bd16f0e to your computer and use it in GitHub Desktop.
diff --git a/translate.cxx b/translate.cxx
index 7a8dc02bc..6d4dd2f3d 100644
--- a/translate.cxx
+++ b/translate.cxx
@@ -2221,12 +2221,6 @@ c_unparser::emit_module_exit ()
o->newline(1) << "int i=0, j=0;"; // for derived_probe_group use
o->newline() << "(void) i;";
o->newline() << "(void) j;";
- // If we aborted startup, then everything has been cleaned up already, and
- // module_exit shouldn't even have been called. But since it might be, let's
- // beat a hasty retreat to avoid double uninitialization.
- o->newline() << "if (atomic_read (session_state()) == STAP_SESSION_STARTING)";
- o->newline(1) << "return;";
- o->indent(-1);
o->newline() << "if (atomic_read (session_state()) == STAP_SESSION_RUNNING)";
// NB: only other valid state value is ERROR, in which case we don't
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment