Skip to content

RTS segfaults when printing profiling information which refers to unloaded objects

Running a profiled binary which loads/unloads objects via the RTS's linker results in a CCS tree with pointers to the shared objects. These references are not checked by checkUnload before unloading the object. Then, when the profiling report is printed at the end of the program, a segfault occurs.

Plan:

  1. Add a test case for this.
  2. Modify checkUnload to prevent objects from being unloaded if the CCS tree points to them.
  3. Modify generateCCSReport to prune the CCS tree after a report is printed.
  4. Expose some way to generate a report on demand, so long-running programs don't keep every object loaded forever.
Trac metadata
Trac field Value
Version 7.10.3
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Runtime System (Linker)
Test case
Differential revisions
BlockedBy
Related
Blocking
CC simonmar
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information