Opened 6 years ago

Last modified 22 months ago

#5355 new bug

Link plugins against existing libHSghc

Reported by: batterseapower Owned by:
Priority: normal Milestone:
Component: Compiler Version: 7.0.3
Keywords: Cc: as@…
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: Runtime performance bug Test Case:
Blocked By: #5987 Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:


This ticket split out from #3843 since it was getting too crowded

Once we can safely export all symbols from libHSghc through the executable, we want to link plugins against the loaded GHC library rather than a new copy. This has two benefits:

  1. Linking plugins will be faster
  2. We can make reinitializeGlobals into a no-op

This is currently blocked by #5292 because libHSghc exports more symbols than we can reexport on Windows. There is one suggestions in #3843 to reexport less: exclude more of GHC's dependencies from being reexported, using this snippet to get the package list:

$(foreach p,$(PACKAGES),$p-$(libraries/$p_dist-install_VERSION))

Once we have cut the number of exported symbols down enough, the patches in #3843's attachment can be applied to fix this ticket. (There was a reported validate failure with this patch in annrun01 on x64 linux which should also be checked)

Change History (8)

comment:1 Changed 6 years ago by

Now the 3843-v2 patches produce unexpected failures for annrun01(ghci) and 5313(ghci), both on 32-bit linux and on 64-bit linux. On 32-bits, both tests segfault, on 64-bits, 5313(ghci) once segfaulted (validate) and once (make TEST=5313) produced

===== program output begins here
5313: /home/dafis/GHC/bghc/inplace/lib/ase: openFile: does not exist (No such file or directory)

for stderr.

annrun01 produced similar stderr:

/home/dafis/GHC/bghc/bindisttest/install dir/lib/ghc-7.3.20110730/ypes_ZC_con_info: openFile: does not exist (No such file or directory)

during validate resp.

/home/dafis/GHC/bghc/inplace/lib/rorHandler_closure: openFile: does not exist (No such file or directory)

with make TEST=annrun01.

Maybe that'll help diagnosing the problem.

comment:2 Changed 6 years ago by thoughtpolice

Cc: as@… added

comment:3 Changed 6 years ago by igloo

Milestone: 7.6.1

comment:4 Changed 5 years ago by igloo


comment:5 Changed 3 years ago by thoughtpolice


Moving to 7.10.1.

comment:6 Changed 2 years ago by thomie

Blocked By: 5987 added; 5292 removed
difficulty: Unknown

comment:7 Changed 2 years ago by thoughtpolice


Moving to 7.12.1 milestone; if you feel this is an error and should be addressed sooner, please move it back to the 7.10.1 milestone.

comment:8 Changed 22 months ago by thomie

Milestone: 7.12.1
Type of failure: None/UnknownRuntime performance bug
Note: See TracTickets for help on using tickets.