Runtime crash due to `-prof -forig-thunk-info`
$ cat hi2.hs
main = putStrLn "hi"
$ ghc hi2.hs -prof -forig-thunk-info
$ ./hi2
Segmentation fault (core dumped)
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
- Show closed items
Relates to
Activity
-
Newest first Oldest first
-
Show all activity Show comments only Show history only
- ghc-triage-bot added needs triage label
added needs triage label
- Ben Gamari changed the description
Compare with previous version changed the description
- Author Maintainer
The problem appears to be that the frame size fails to account for the profiling header.
The following should fix this:
diff --git a/rts/StgMiscClosures.cmm b/rts/StgMiscClosures.cmm index 80dc84692c5..d9546940c6c 100644 --- a/rts/StgMiscClosures.cmm +++ b/rts/StgMiscClosures.cmm @@ -51,8 +51,8 @@ INFO_TABLE_RET (stg_orig_thunk_info_frame, RET_SMALL, W_ thunk_info_ptr) /* no args => explicit stack */ { - unwind Sp = W_[Sp + WDS(2)]; - Sp_adj(2); + unwind Sp = W_[Sp + SIZEOF_StgOrigThunkInfoFrame]; + Sp = Sp + SIZEOF_StgOrigThunkInfoFrame; jump %ENTRY_CODE(Sp(0)) [*]; // NB. all registers live! }
- Ben Gamari assigned to @bgamari
assigned to @bgamari
- Ben Gamari removed needs triage label
removed needs triage label
- Ben Gamari mentioned in commit 0390ab7a
mentioned in commit 0390ab7a
- Ben Gamari mentioned in merge request !12621 (closed)
mentioned in merge request !12621 (closed)
- Ben Gamari marked #24873 (closed) as a duplicate of this issue
marked #24873 (closed) as a duplicate of this issue
- Ben Gamari marked this issue as related to #24873 (closed)
marked this issue as related to #24873 (closed)
- Andreas Klebinger mentioned in commit 4acf252e
mentioned in commit 4acf252e
- Andreas Klebinger mentioned in commit 2da93f8e
mentioned in commit 2da93f8e
- Andreas Klebinger mentioned in commit 6d00956c
mentioned in commit 6d00956c
Please register or sign in to reply