[Darshan-commits] [Git][darshan/darshan][issue-218-val-counter] fix segfault in common val counters

Philip Carns xgitlab at cels.anl.gov
Sun Jan 22 18:45:02 CST 2017


Philip Carns pushed to branch issue-218-val-counter at darshan / darshan


Commits:
ace2260c by Phil Carns at 2017-01-22T19:44:43-05:00
fix segfault in common val counters

- - - - -


2 changed files:

- ChangeLog
- darshan-runtime/lib/darshan-common.c


Changes:

=====================================
ChangeLog
=====================================
--- a/ChangeLog
+++ b/ChangeLog
@@ -10,6 +10,9 @@ Darshan-3.1.3-pre1
 * skip instrumentation attempts for anonymous mmap() calls; this avoids a
   potentential deadlock condition when used with hugepages on Cray systems.
   Reported by Glenn Lockwood and Cristian Simarro.
+* fix segmentation fault in statistics collection for applications that issue
+  operations with a large number of distince access sizes or strides on the
+  same file.  Reported by Glenn Lockwood.
 
 Darshan-3.1.2
 =============


=====================================
darshan-runtime/lib/darshan-common.c
=====================================
--- a/darshan-runtime/lib/darshan-common.c
+++ b/darshan-runtime/lib/darshan-common.c
@@ -267,9 +267,13 @@ void darshan_common_val_counter(void **common_val_root, int *common_val_count,
         (*common_val_count)++;
     }
 
-    /* update common access counters as we go */
-    DARSHAN_COMMON_VAL_COUNTER_INC(common_val_p, common_cnt_p,
-        found->val, found->freq, 1);
+    /* update common access counters as we go, as long as we haven't already
+     * hit the limit in the number we are willing to track */
+    if(found)
+    {
+        DARSHAN_COMMON_VAL_COUNTER_INC(common_val_p, common_cnt_p,
+            found->val, found->freq, 1);
+    }
 
     return;
 }



View it on GitLab: https://xgitlab.cels.anl.gov/darshan/darshan/commit/ace2260cbeae9423982edc4409c98ffbfb24cb1a
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/darshan-commits/attachments/20170122/a90ffc00/attachment-0001.html>


More information about the Darshan-commits mailing list