cpanel / perl-compiler

cPanel's custom implementation of B::C
https://cpanel.net
Other
8 stars 3 forks source link

clear Template::Provider once done with Template #78

Closed atoomic closed 6 years ago

atoomic commented 6 years ago

Case BC-1645:

atoomic commented 6 years ago

A little background for this case. Some basic steps to reproduce the issue fixed there notice the DESTROY created new reference to dead object warning coming from perl internal itself

> perlcc -v4 -e 'use Template; print qq[ok\n]'
--
/usr/local/cpanel/3rdparty/perl/526/bin/perlcc: B is not used by the program: adding -UB to skip it
/usr/local/cpanel/3rdparty/perl/526/bin/perlcc: Writing C on pcc4AC6f.c
/usr/local/cpanel/3rdparty/perl/526/bin/perlcc: Calling /usr/local/cpanel/3rdparty/perl/526/bin/perl -MO=C,-UB,-opcc4AC6f.c -e 'use Template; print qq[ok\n]'
/usr/local/cpanel/3rdparty/perl/526/bin/perlcc: Unexpected compiler output
DESTROY created new reference to dead object 'Template::Provider' during global destruction.
/usr/local/cpanel/3rdparty/perl/526/bin/perlcc: Calling /usr/lib64/ccache/gcc  -DPERL_DISABLE_PMC -fPIC -DPIC -I/usr/local/cpanel/3rdparty/perl/526/include -I/usr/local/cpanel/3rdparty/include -L/usr/local/cpanel/3rdparty/lib64 -m64 -fwrapv -fno-strict-aliasing -fstack-protector-strong -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -I/usr/local/cpanel/3rdparty/perl/526/lib64/perl5/5.26.0/x86_64-linux-64int/CORE -o ./a.out pcc4AC6f.c -Wl,-E -Wl,-rpath,/usr/local/cpanel/3rdparty/perl/526/lib64/perl5/5.26.0/x86_64-linux-64int/CORE -L/usr/local/cpanel/3rdparty/lib64 -L/usr/local/cpanel/3rdparty/lib64 -L/usr/lib64 -L/lib64 -lgdbm -fstack-protector-strong -L/usr/local/lib /usr/local/cpanel/3rdparty/perl/526/lib64/perl5/5.26.0/x86_64-linux-64int/auto/Cwd/Cwd.so /usr/local/cpanel/3rdparty/perl/526/lib64/perl5/5.26.0/x86_64-linux-64int/auto/List/Util/Util.so -L/usr/local/cpanel/3rdparty/perl/526/lib64/perl5/5.26.0/x86_64-linux-64int/CORE /usr/local/cpanel/3rdparty/perl/526/lib64/perl5/5.26.0/x86_64-linux-64int/CORE/libperl.so -lpthread -lnsl -ldl -lm -lcrypt -lutil -lc
In file included from /usr/include/sys/types.h:25:0,
from /usr/local/cpanel/3rdparty/perl/526/lib64/perl5/5.26.0/x86_64-linux-64int/CORE/perl.h:694,
from pcc4AC6f.c:7:
/usr/include/features.h:330:4: warning: #warning _FORTIFY_SOURCE requires compiling with optimization (-O) [-Wcpp]
#  warning _FORTIFY_SOURCE requires compiling with optimization (-O)
^
/usr/local/cpanel/3rdparty/perl/526/bin/perlcc: Unlinking pcc4AC6f.c