Skip to content
This repository was archived by the owner on Jun 1, 2023. It is now read-only.

Commit 9d5e4bf

Browse files
committed
dl_load_file: set NULL xs (bootstrap)
When we find the bootname via dl_find_symbol early, we still need to set xs from dl_install_xsub(). Coverity CID #165325
1 parent 280dfb8 commit 9d5e4bf

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

ext/DynaLoader/dlutils.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -840,11 +840,12 @@ dl_load_file(pTHX_ I32 ax, SV* file, SV *module, int gimme)
840840
if (!boot_symbol_ref) {
841841
Perl_die(aTHX_ "Can't find '%s' symbol in %s\n", SvPVX(bootname), SvPVX(file));
842842
}
843+
844+
boot:
843845
{
844846
AV *dl_modules = get_avs("DynaLoader::dl_modules", GV_ADDMULTI);
845847
AV_PUSH(dl_modules, pv_copy(module)); /* record loaded module */
846848
}
847-
848849
{
849850
CV *dl_install_xsub = get_cvs("DynaLoader::dl_install_xsub", 0);
850851
SV *bootstrap = newSVpvs("");
@@ -869,8 +870,6 @@ dl_load_file(pTHX_ I32 ax, SV* file, SV *module, int gimme)
869870
AV *dl_shared_objects = get_avs("DynaLoader::dl_shared_objects", GV_ADDMULTI);
870871
AV_PUSH(dl_shared_objects, SvREFCNT_inc_simple_NN(file)); /* record loaded files */
871872
}
872-
873-
boot:
874873
{
875874
/* Note: the 1st arg must be the package name,
876875
the opt. 2nd arg the VERSION */

0 commit comments

Comments
 (0)