summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--rts/LdvProfile.c3
-rw-r--r--testsuite/tests/profiling/should_run/T11978a.hs2
-rw-r--r--testsuite/tests/profiling/should_run/T11978a.stdout1
-rw-r--r--testsuite/tests/profiling/should_run/all.T4
4 files changed, 10 insertions, 0 deletions
diff --git a/rts/LdvProfile.c b/rts/LdvProfile.c
index 2330d74bd1..4a2ee42424 100644
--- a/rts/LdvProfile.c
+++ b/rts/LdvProfile.c
@@ -178,6 +178,9 @@ processNurseryForDead( void )
StgPtr p;
bdescr *bd;
+ if (MainCapability.r.rNursery == NULL)
+ return;
+
for (bd = MainCapability.r.rNursery->blocks; bd != NULL; bd = bd->link) {
p = bd->start;
while (p < bd->free) {
diff --git a/testsuite/tests/profiling/should_run/T11978a.hs b/testsuite/tests/profiling/should_run/T11978a.hs
new file mode 100644
index 0000000000..bb859f3ee8
--- /dev/null
+++ b/testsuite/tests/profiling/should_run/T11978a.hs
@@ -0,0 +1,2 @@
+main :: IO ()
+main = putStrLn "Hello!"
diff --git a/testsuite/tests/profiling/should_run/T11978a.stdout b/testsuite/tests/profiling/should_run/T11978a.stdout
new file mode 100644
index 0000000000..10ddd6d257
--- /dev/null
+++ b/testsuite/tests/profiling/should_run/T11978a.stdout
@@ -0,0 +1 @@
+Hello!
diff --git a/testsuite/tests/profiling/should_run/all.T b/testsuite/tests/profiling/should_run/all.T
index c6ce6d45a4..1f74a27c8f 100644
--- a/testsuite/tests/profiling/should_run/all.T
+++ b/testsuite/tests/profiling/should_run/all.T
@@ -106,3 +106,7 @@ test('T11627b', [ extra_run_opts('+RTS -i0 -RTS') # census after each GC
]
, compile_and_run
, [''])
+
+test('T11978a',
+ [only_ways(['profthreaded']), extra_run_opts('+RTS -hb -N10')],
+ compile_and_run, [''])