Skip to content

Commit

Permalink
i#1729 offline traces: fix module tracking library exit
Browse files Browse the repository at this point in the history
Adds a missing decrement of the repeat-guard in the modtrack library exit
routine.  Without it, forthcoming re-attach (i#2157) tests fail.

Review-URL: https://codereview.appspot.com/316250043
  • Loading branch information
derekbruening committed Feb 3, 2017
1 parent a365bcc commit ad88186
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ext/drcovlib/modules.c
@@ -1,5 +1,5 @@
/* ***************************************************************************
* Copyright (c) 2012-2016 Google, Inc. All rights reserved.
* Copyright (c) 2012-2017 Google, Inc. All rights reserved.
* ***************************************************************************/

/*
Expand Down Expand Up @@ -284,6 +284,10 @@ drmodtrack_init(void)
drcovlib_status_t
drmodtrack_exit(void)
{
int count = dr_atomic_add32_return_sum(&drmodtrack_init_count, -1);
if (count != 0)
return DRCOVLIB_SUCCESS;

drvector_delete(&module_table.vector);
drmgr_exit();
return DRCOVLIB_SUCCESS;
Expand Down

0 comments on commit ad88186

Please sign in to comment.