diff options
author | Ben Gamari <ben@well-typed.com> | 2021-01-02 23:26:31 -0500 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2021-01-09 21:22:14 -0500 |
commit | f6b843cd44fd0170af06f52f2e1d25908184aabb (patch) | |
tree | f2140bec0d302a5f26a245c695f41a686112662f /rts | |
parent | d1b9d679459bcdca064d3049cc76db50c625b1a1 (diff) | |
download | haskell-f6b843cd44fd0170af06f52f2e1d25908184aabb.tar.gz |
rts/PEi386: Fix reentrant lock usage
Previously lookupSymbol_PEi386 would call lookupSymbol while
holding linker_mutex. Fix this by rather
calling `lookupDependentSymbol`. This is safe
because lookupSymbol_PEi386 unconditionally holds linker_mutex.
Happily, this un-breaks `T12771`, `T13082_good`, and `T14611`, which
were previously marked as broken due to #18718.
Closes #19155.
Diffstat (limited to 'rts')
-rw-r--r-- | rts/linker/PEi386.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/rts/linker/PEi386.c b/rts/linker/PEi386.c index 917a641310..9f13b4ce3d 100644 --- a/rts/linker/PEi386.c +++ b/rts/linker/PEi386.c @@ -2064,7 +2064,7 @@ SymbolAddr *lookupSymbol_PEi386(SymbolName *lbl) else if (pinfo && pinfo->owner && isSymbolImport (pinfo->owner, lbl)) { /* See Note [BFD import library]. */ - HINSTANCE dllInstance = (HINSTANCE)lookupSymbol(pinfo->value); + HINSTANCE dllInstance = (HINSTANCE)lookupDependentSymbol(pinfo->value, NULL); if (!dllInstance && pinfo->value) return pinfo->value; |