summaryrefslogtreecommitdiff
path: root/rts/Hpc.c
diff options
context:
space:
mode:
authorandy@galois.com <unknown>2007-02-13 22:02:03 +0000
committerandy@galois.com <unknown>2007-02-13 22:02:03 +0000
commit7b60a2503ddc77a23d7c19c8d3079fb4a997f0ea (patch)
treee9822bf9ea45303d59832c9b69f63cdb01616711 /rts/Hpc.c
parentebf733111484edc973797025418cba8f096246f6 (diff)
downloadhaskell-7b60a2503ddc77a23d7c19c8d3079fb4a997f0ea.tar.gz
Fixing bad allocation of tix box breakpointing array.
Diffstat (limited to 'rts/Hpc.c')
-rw-r--r--rts/Hpc.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/rts/Hpc.c b/rts/Hpc.c
index 823439dd21..c474d8121b 100644
--- a/rts/Hpc.c
+++ b/rts/Hpc.c
@@ -471,6 +471,7 @@ startupHpc(void) {
int comma;
Info *tmpModule;
int rixFD, rixCmdFD;
+ int tixCount = 0;
assert(hpc_inited);
@@ -511,6 +512,8 @@ startupHpc(void) {
tmpModule->modName,
tmpModule->tickCount);
+ tixCount += tmpModule->tickCount;
+
debugTrace(DEBUG_hpc,"(tracer)%s: %u (offset=%u)\n",
tmpModule->modName,
tmpModule->tickCount,
@@ -523,7 +526,7 @@ startupHpc(void) {
// Allocate the tixBox breakpoint array
// These are set to 1 if you want to
// stop at a specific breakpoint
- tixBoxBP = (int *)calloc(1,sizeof(int));
+ tixBoxBP = (int *)calloc(tixCount,sizeof(int));
}
}