Skip to content
Snippets Groups Projects
Commit b7d760c9 authored by Ben Gamari's avatar Ben Gamari
Browse files

compiler: Initial ForeignExportsList.n_entries

The refactoring in ed57c3a9 failed to
initialize this field, resulting in no exports being registered. A very
silly bug and yet somehow none of our tests caught it.

See #18548.

Fixes #19149.
parent 2113a1d6
No related merge requests found
Pipeline #29343 passed with warnings
......@@ -715,7 +715,10 @@ foreignExportsInitialiser mod hs_fns =
-- See Note [Tracking foreign exports] in rts/ForeignExports.c
vcat
[ text "static struct ForeignExportsList" <+> list_symbol <+> equals
<+> braces (text ".exports = " <+> export_list) <> semi
<+> braces (
text ".exports = " <+> export_list <> comma <+>
text ".n_entries = " <+> ppr (length hs_fns))
<> semi
, text "static void " <> ctor_symbol <> text "(void)"
<+> text " __attribute__((constructor));"
, text "static void " <> ctor_symbol <> text "()"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment