Ticket #7149 (closed bug: fixed)

Opened 9 months ago

Last modified 9 months ago

Heap profiling restricted with retainers (+RTS -hrfoo -hc) segfaults

Reported by: akio Owned by: pcapriotti
Priority: normal Milestone: 7.6.1
Component: Profiling Version: 7.5
Keywords: Cc:
Operating System: Linux Architecture: x86_64 (amd64)
Type of failure: Runtime crash Difficulty: Unknown
Test Case: Blocked By:
Blocking: Related Tickets:

Description

Steps to reproduce:

% cat hello.hs
main = print $ last [0..]
% ghc hello.hs -prof
[1 of 1] Compiling Main             ( hello.hs, hello.o )
Linking hello ...
% ./hello +RTS -hrfoo -hc
zsh: segmentation fault  ./hello +RTS -hrfoo -hc

Attachments

0001-Profiling-open-.prof-when-hr-cc-is-specified.patch Download (0.9 KB) - added by akio 9 months ago.
A proposed patch

Change History

Changed 9 months ago by akio

A proposed patch

Changed 9 months ago by akio

  • status changed from new to patch

The issue seems to be that the retainer profiling code tries to write to a NULL file pointer.

Changed 9 months ago by pcapriotti

  • owner set to pcapriotti
  • difficulty set to Unknown
  • milestone set to 7.6.1

Changed 9 months ago by pcapriotti

  • status changed from patch to merge

Applied, thanks.

commit 4e0a957758af94bc39ff51814bad54faf96a94b9
Author: Takano Akio <aljee@hyper.cx>
Date:   Wed Aug 15 11:16:40 2012 +0900

    Profiling: open .prof when -hr<cc> is specified
    
    The code for retainer profiling is used with e.g. +RTS -hc -hrfoo -RTS,
    as well as with +RTS -hr -RTS.

Changed 9 months ago by pcapriotti

  • status changed from merge to closed
  • resolution set to fixed

Merged as 66cb7e7293709d573c0d5e320507214e64127fde.

Note: See TracTickets for help on using tickets.