diff options
author | Simon Marlow <simonmar@microsoft.com> | 2007-06-13 10:29:28 +0000 |
---|---|---|
committer | Simon Marlow <simonmar@microsoft.com> | 2007-06-13 10:29:28 +0000 |
commit | 23e5985c3db852981d527d10d6a6271688049790 (patch) | |
tree | 7b87dd13cdbbebb56be5e530fe524bd5694a2d22 /compiler/cmm/CmmParse.y | |
parent | 62d948405f6b9a95fe4b31b7cffa387e5425d6db (diff) | |
download | haskell-23e5985c3db852981d527d10d6a6271688049790.tar.gz |
FIX #1418 (partially)
When the con_desc field of an info table was made into a relative
reference, this had the side effect of making the profiling fields
(closure_desc and closure_type) also relative, but only when compiling
via C, and the heap profiler was still treating them as absolute,
leading to crashes when profiling with -hd or -hy.
This patch fixes up the story to be consistent: these fields really
should be relative (otherwise we couldn't make shared versions of the
profiling libraries), so I've made them relative and fixed up the RTS
to know about this.
Diffstat (limited to 'compiler/cmm/CmmParse.y')
-rw-r--r-- | compiler/cmm/CmmParse.y | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/compiler/cmm/CmmParse.y b/compiler/cmm/CmmParse.y index ae23e19494..b3f68a9b1e 100644 --- a/compiler/cmm/CmmParse.y +++ b/compiler/cmm/CmmParse.y @@ -724,16 +724,19 @@ conInfo name ptrs nptrs srt_bitmap cl_type desc_str ty_str = do return (lbl, info1, [desc_field]) basicInfo name layout srt_bitmap cl_type desc_str ty_str = do + let info_lbl = mkRtsInfoLabelFS name lit1 <- if opt_SccProfilingOn - then code $ mkStringCLit desc_str + then code $ do lit <- mkStringCLit desc_str + return (makeRelativeRefTo info_lbl lit) else return (mkIntCLit 0) lit2 <- if opt_SccProfilingOn - then code $ mkStringCLit ty_str + then code $ do lit <- mkStringCLit ty_str + return (makeRelativeRefTo info_lbl lit) else return (mkIntCLit 0) let info1 = mkStdInfoTable lit1 lit2 (fromIntegral cl_type) (fromIntegral srt_bitmap) layout - return (mkRtsInfoLabelFS name, info1, []) + return (info_lbl, info1, []) funInfo name ptrs nptrs cl_type desc_str ty_str fun_type = do (label,info1,_) <- stdInfo name ptrs nptrs 0{-srt_bitmap-} |