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.
- Add a test case for this.
- Modify checkUnload to prevent objects from being unloaded if the CCS tree points to them.
- Modify generateCCSReport to prune the CCS tree after a report is printed.
- Expose some way to generate a report on demand, so long-running programs don't keep every object loaded forever.
|Component||Runtime System (Linker)|