Fixed a bug where an attempt to index into an array location -1 is made at
authorChee Wai Lee <cheelee@illinois.edu>
Tue, 14 Apr 2009 19:34:03 +0000 (19:34 +0000)
committerChee Wai Lee <cheelee@illinois.edu>
Tue, 14 Apr 2009 19:34:03 +0000 (19:34 +0000)
runtime.

src/ck-perf/trace-Tau.C

index c853dca5a378aba56b0b305c1b7e9430d8e05ffa..89edc1fc0f3055f6d755b022aa4fc2bd276694cb 100644 (file)
@@ -76,7 +76,7 @@ void startEntryEvent(int id)
 {
   dprintf("---------> starting Entry Event with id: %d\n", id);
 
-  if (events[id] == NULL)
+  if ((id == -1) || (events[id] == NULL))
     {
       dprintf("-------> create event with id: %d\n", id);
       //sprintf(name, "Event %d", id);