STATUS 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386
  1. 5.8, 5.6 and earlier had a good core perl compiler, but we are much better.
  2. Still missing in general are:
  3. - attribute handlers (i.e. run-time attributes)
  4. - compile-time perlio layers
  5. - compile-time re-eval groups (?{})
  6. - smartmatch subrefs
  7. - compile-time stash-magic delete renames to ANON
  8. B::C is stable and used in production for -O0 and -O3. For bigger programs
  9. not all methods in certain packages or eval strings might be detected,
  10. you'd need to add them manually via -u<packagename>.
  11. B::CC is very unstable, work is in progress. Certain alioth benchmarks are 6x faster.
  12. Recursive function calls and certain dynamic ops are not yet supported.
  13. The Bytecode compiler is only stable for >=5.8.
  14. The CPAN Bytecode compiler is disabled for 5.6, we keep the old.
  15. The old core compiler fails for 50% of the testcases.
  16. Windows and other OS with strict linking <5.16 will fail to install due to some
  17. not exported libperl symbols. Looks at the patches in ramblings.
  18. Security: The latest released compiler version is only recommended up to 5.14.4.
  19. Newer perl versions do work, but 5.16.x-5.20.0 upstream are too insecure
  20. to be recommended for production yet.
  21. 5.20 finally properly handles unicode names, but identifiers and package
  22. names are still handled as binary blobs, which could lead to TR39 issues.
  23. Check your code for syntax spoofs, confusables, strip \\0 from package names
  24. and enable use warnings 'syscalls'.
  25. There is no strict 'names' pragma and no confusables pragma yet.
  26. See http://websec.github.io/unicode-security-guide/
  27. C and CC: Same ok and less failures as with 5.6, 5.8 and 5.9.4.
  28. In 5.8.8 and 5.8.9 we have much less errors in the testsuite for the
  29. new CPAN compiler and the CORE compiler. See below.
  30. Most B::C and B::CC bugs fixed.
  31. Compatibility added for all major releases since 5.6.2
  32. Open Problems for B::C:
  33. See google issues.
  34. See below at the detailed status of the major releases.
  35. TEST STATUS
  36. -----------
  37. Regularily tested on cygwin1.7, darwin 10.8/intel, centos4, centos5, centos6,
  38. debian5, debian6, freebsd7, freebsd8, solaris10/intel sunpro, openbsd49, netbsd.
  39. With the respective default gcc and clang compilers, with the latest address-sanitizer
  40. versions.
  41. Not so regurarily on darwin 10.4/ppc, strawberry-5.10.1, strawberry-5.12.2,
  42. strawberry-5.14, strawberry-5.16 and activeperl-5.10.1/msvc8
  43. List of failed tests.
  44. CORE (old)
  45. ----
  46. 5.6.2:
  47. t/bytecode 3,6,8..10,12,15,16,18,28,31,35,38,39
  48. t/c 8,15,16,22,27,28,31 | 27 worked in 5.6.2!
  49. t/c_o1 8,15,16,22,27,28,31
  50. t/c_o2 8,15,16,22,27,28,31
  51. t/cc 15,18,21,25,27,28,30..32
  52. t/cc_o1 15,18,21,25,27,28,30..32
  53. t/cc_o2 10,15,16,18,21,25,26,27,28,30..32
  54. 5.8: | non-threaded
  55. t/bytecode 27,44,33,39
  56. t/c 11,14,15,20,23,27..29,31,101,102 | 5,7-12,14-20,22-23,25,27,28,30,31
  57. t/c_o1 1,3-8,10..12,14,15,17..25,27..29,31,101,102| 7-12,14-20,22-23,25,27,28,30,31
  58. t/c_o2 1,3-12,14,15,17..25,27..29,31,101,102 | 7-12,14-20,22-23,25,27,28,30,31
  59. t/cc 7,11,14,15,18..21,23..25,28..32,101..103
  60. t/cc_o1 7,11,14,15,18..21,23..32,101..103
  61. t/cc_o2 7,10,11,14..16,18-21,23..32,101..103
  62. Recipe:
  63. p=perl5.6.2
  64. t/testc.sh -q -c
  65. for t in $(seq -f"%02.0f" 32); do rm ccode 2>/dev/null; $p -MO=C,-occode.c ccode$t.pl 2>/dev/null && $p script/cc_harness ccode.c -o ccode >/dev/null; echo -n "$t: "; $p ccode$t.pl; echo -n " => "; ./ccode; echo; done
  66. p=perl5.8.9
  67. for t in $(seq -f"%02.0f" 35); do rm ccode 2>/dev/null; $p -MO=C,-occode.c ccode$t.pl 2>/dev/null && $p script/cc_harness -Bstatic ccode.c -o ccode >/dev/null; echo -n "$t: "; $p ccode$t.pl; echo -n " => "; ./ccode; echo; done
  68. p=perl5.8.9d-nt
  69. for t in $(seq -f"%02.0f" 35); do rm ccode 2>/dev/null; $p -MO=C,-occode.c ccode$t.pl 2>/dev/null && $p script/cc_harness -Bdynamic ccode.c -o ccode >/dev/null; echo -n "$t: "; $p ccode$t.pl; echo -n " => "; ./ccode; echo; done
  70. B::C (new)
  71. ----
  72. t/testc.sh -q -c; t/testcc.sh -q -c or make test TEST_VERBOSE=1
  73. See t/test.pl for the TODO tests:
  74. Only 42..43 < 5.12
  75. CPAN Modules
  76. ------------
  77. See t/modules.t:is_todo() We only try to compile use module, not the testsuite.
  78. We only try B::C with -O3 so far.
  79. The full module testsuite is run with t/testm.sh -t [OPTS] Module
  80. Compile-time status from top100:
  81. 5.6.2 fail 12.5% Test::* Moose* DateTime* FCGI
  82. 5.8.5 pass 100%
  83. 5.8.8 fail 1% Test::Tester
  84. 5.8.9 pass 100%
  85. 5.10.1 pass 100%
  86. Attribute::Handlers #TODO 5.10.1d with threads
  87. 5.12.5 pass 100%
  88. 5.14.4 pass 100%
  89. 5.16.3 fail 1% Module::Build (out of memory/use-after-free)
  90. 5.18.2 fail 2% ExtUtils::ParseXS (re-eval)
  91. Module::Build (out of memory/use-after-free)
  92. 5.20.0 fail 1% ExtUtils::ParseXS (re-eval)
  93. Run-time tests not yet fully done
  94. 5.21.2 status
  95. -----------
  96. Bytecode: sibling/lastsib with PERL_OP_PARENT broken for sort (18,19,25)
  97. 5.20 status
  98. -----------
  99. fully supported since 1.48
  100. 5.18 status
  101. -----------
  102. fully supported since 1.48
  103. 5.10, 5.12, 5.14, 5.16, 5.18, 5.20 status
  104. ----------------------------------------
  105. TODO for B::C
  106. see google issues https://code.google.com/p/perl-compiler/issues/
  107. Most of them have either easy workarounds or are not fixable.
  108. - attribute handlers (i.e. run-time attributes)
  109. - compile-time perlio layers
  110. - re-eval groups (?{})
  111. - smartmatch subrefs
  112. - compile-time stash-magic delete renames to ANON
  113. Fix CC
  114. several other issues detected (and mostly fixed) by Heinz Knutzen
  115. minimize pad copies from local to pad
  116. label not defined (utf8::SWASHNEW)
  117. -faelem is fast but still a bit unstable
  118. -funroll-loops by Will Braswell not yet merged
  119. DONE
  120. ----
  121. fixed with 1.48:
  122. bytecode compiler for >=5.18
  123. C/CC walker, dumping all external, non compiler added packages properly
  124. and detecting required compiler added packages also.
  125. RTLD_NOLOAD on BSD for run-time remapping of .so syms
  126. Moose XS init
  127. fixed with 1.47:
  128. run-time remapping of .so syms with special support by Encode-2.58
  129. fix %INC cleanup
  130. non-const %warnings::Bits with -O3
  131. lexical subs threaded
  132. Coro
  133. some readonly related problems: re-eval, hashes
  134. byteloader binmode for 5.18
  135. mro and maybe::next
  136. fixed with 1.46:
  137. global destruction of our and global objects
  138. utf8 qr and utf8 /i initialization with -fppaddr
  139. @-
  140. lexical warnings on 5.8
  141. -O4 CvSTART cops
  142. mro: c3 and maybe|next:: method calls
  143. Encode dlsym patching of compile-time XS handles (Net::DNS, IO::Socket::SSL)
  144. $/, $@ and $\, esp. when localized
  145. dump all used @ISA's
  146. GvFORM pseudo CVs (B::FM) on 5.10
  147. __DATA__ blocks in packages without printing wrong warnings
  148. Replace each %hash with foreach sort keys (no random misses of functions)
  149. fixed with 1.44:
  150. SvLEN and PV ptr for empty shared hash keys
  151. cop_hints to support lexical numeric hints pragmas (use bytes, use open, ...)
  152. -O3 with ~ and ~~ formatstrings
  153. skip saving a cv on defined(&cv)
  154. format STDOUT/STDERR
  155. Save empty bodyless subs if they exist, for signal handlers, prototypes declarations
  156. and cvrefs
  157. PVMG PV overwriting the RV, overload sub
  158. fixed with 1.43:
  159. static strings and heks with LEN=0
  160. restore of many more dynamic magic variables: @+,@-,$$,${^UNICODE} ${^UTF8LOCALE}
  161. $; $\ $, $/ $" $| $^A $^L $: $% $- $= $^H $^R
  162. and allow other GP entries for ENV, ARGV, ...
  163. do not set newGP for symbols, thus do not disturb pre-initialization, esp. XS CVs
  164. do not boot internal core XS packages twice
  165. better load-order for dynaloaded modules, which helps esp. on windows
  166. improved deeper walker, detect more missing empty packages
  167. HvAUX init without magic (iterators)
  168. new PADLIST type
  169. unicode and binary strings and heks
  170. COW support
  171. proper len of QR refs
  172. stash symtab magic for PMf_ONCE m?? and reset
  173. lexwarns
  174. (See Changes for all fixes)
  175. fixed with 1.42:
  176. my_share_hek (global destruction)
  177. Turn off CvDYNFILE
  178. save @ISA of empty child classes
  179. fixed with 1.40:
  180. static PerlIO Layers
  181. synced %INC
  182. defer eval section after dl_init
  183. fixed with 1.39:
  184. improved eval AUTOLOAD
  185. fixed with 1.37:
  186. fixed wrong test 46, test for Exporter STASH in *main:: STASH
  187. copy-on-grow with LEN=0 and FAKE clash with share_hek
  188. share_hek re-implemented
  189. init of READONLY hash keys
  190. re-hash everything at startup (oCERT-2011-003)
  191. find UNIVERSAL methods, load SelectSaver with IO
  192. hv_clear_placeholders
  193. %+, %-, %!
  194. %SIG
  195. magic->PTR when SV (>5.6)
  196. attributes::reftype
  197. inc_cleanup (partially)
  198. CV prototypes (>5.10)
  199. ignore aelemfast SPECIAL pads (5.8.[45])
  200. strip version object overload from XS packages (i91)
  201. restore stdio handles from BEGIN blocks (Test::NoWarnings)
  202. B::COP::stashflags (>5.15.4)
  203. lost PL_regex_pad, (5.15 threaded)
  204. fixed with 1.36:
  205. 5.15 XSLoader and hash init
  206. support lexical warnings
  207. better __DATA__ detection and support,
  208. still IO::File not IO::Scalar handle though
  209. fixed test 29 mostly (use IO)
  210. fixed with 1.35:
  211. improve package_pv detection for methods,
  212. detect previously missing packages within the main source file
  213. run-time %ENV
  214. fixed with 1.32:
  215. improved scanner, try_isa, mark_package force, ...
  216. do not gp_free shared GPs
  217. Internals::V
  218. dl_init of cached deleted packages
  219. fixed with 1.30:
  220. cc_queue sort 18 ccpp
  221. dl_init regression
  222. xs_init (soname by context)
  223. 5.14 support
  224. package_pv detection for method_named
  225. AUTOLOAD goto xsub and SelfLoader esp. on 5.8 (27).
  226. use AutoLoader works okay. (test 27, 31)
  227. >5.11.3 test 32 catch evaltry die
  228. fixed test 29 >5.10 DEBUGGING for -O0 (use IO)
  229. fixed xpvio off-by-one error for 5.10 (test 29)
  230. mark a package which is autoloaded from XS
  231. fixed forbidden REGEXP IVX/NVX access since 5.12
  232. fixed evaltry (test 12), NVX was shared with 2 xpad_cop_seq ints
  233. which accidently just worked before 1.17, but not after using the %g
  234. representation changed with 1.16. Also fixed in Bytecode, fixing tests 9,10,12.
  235. fixed several minor bugs only in modules, no short testcases yet. See Changes
  236. fixed PP_ENTEREVAL (CC test 12) for 5.10 with 1.14.
  237. Nullify ending retop for the string to CALLRUNOPS.
  238. fixed __DATA__ IO (test 15) on 5.10 and 5.11 with 1.12.
  239. On 5.6 it is hard to fix (re-implement PerlIO::scalar).
  240. fixed RV => IV on blead (test 16 tiearray magic obj HVref) with 1.11
  241. fixed GV -> BM magic (index) without needing fbm_compile with 1.09. Just 5.8.9 not.
  242. fixed non-xsub AUTOLOAD (31) with 1.08
  243. ccode17_o1 namepad[1] to PL_sv_undef
  244. GVCV for 5.11 (27)
  245. runtime require $scalar (28)
  246. RVs for 5.11 (29)
  247. index (fbm_compile) for GVs fixed with 1.04_31
  248. test 14+23 destruction of GvPVX of the empty main:: stash fixed by adding a dummy.
  249. cccode19 sort failure via custom sortcv fixed with B::CC 1.02_03. endless loop
  250. autoload subs from main::, from packages it works ok (test 8)
  251. fixed with 1.04_25
  252. panic: illegal pad in pad_new: 0x18c4368[0x18cf6e8] with DEBUGGING only
  253. CvPADLIST: curpad<=>comppad
  254. fixed with 1.04_22
  255. pvx: seems to be fixed now in bc, and c
  256. With the move of the pvx field from xpv to the sv, we have to solve
  257. that differently for the Bytecode and C backend.
  258. Bytecode can simply mimic the old XPV behaviour of a 3 field struct
  259. (pvx, cur, len) to simplify pv handling.
  260. hv: crash at invalid entry in hv_store in B::HV::save fixed
  261. hek: new implementation, needs static optimization via heksect
  262. regexp: match works, split still broken
  263. bc 10: padv+sassign => Modification of a read-only value attempted at
  264. bytecode10.pl line 1. Only on cygwin, not on linux!
  265. The bytecode is exactly the same, it must be pp_entersub() with &$cv()
  266. Is FAKE flag of the padsv is missing or should we check for readonly pads?
  267. g <1> entersub[t4] vKS/TARG,1
  268. => Perl_sv_force_normal_flags()
  269. if (SvREADONLY(sv) && (!SvFAKE(sv)) && (IN_PERL_RUNTIME)) => die
  270. SV = NULL(0x0) at 0x12207c0
  271. REFCNT = 2147483129
  272. FLAGS = (READONLY)
  273. -Dt crash fixed by core patch pl-dump-const.patch
  274. cop_io status?
  275. http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2006-05/msg00770.html
  276. 5.8 status
  277. ----------
  278. I've restored full 5.8 backwards compatibility, mainly for test comparison.
  279. But since the new B::C compiler is better than the CORE compiler, it is installed.
  280. TEST COVERAGE
  281. -------------
  282. Bytecode:
  283. coverage for ret(0) ldsv(1) ldop(2) stsv(3) stop(4) stpv(5) ldspecsv(6)
  284. ldspecsvx(7) newsv(8) newsvx(9) nop(10) newop(11) newopx(12) newopn(13)
  285. newpv(14) pv_cur(15) pv_free(16) sv_upgrade(17) sv_refcnt(18) sv_refcnt_add(19)
  286. sv_flags(20) xrv(21) xpv(22) xpv_cur(23) xpv_len(24) xiv(25) xnv(26)
  287. xlv_targoff(27) xlv_targlen(28) xlv_targ(29) xlv_type(30) xbm_useful(31)
  288. xbm_previous(32) xbm_rare(33) xfm_lines(34) comment(35) xio_lines(36) xio_page(37)
  289. xio_page_len(38) xio_lines_left(39) xio_top_name(40) xio_top_gv(41) xio_fmt_name(42)
  290. xio_fmt_gv(43) xio_bottom_name(44) xio_bottom_gv(45) xio_type(46) xio_flags(47)
  291. xcv_xsubany(48) xcv_stash(49) xcv_start(50) xcv_root(51) xcv_gv(52) xcv_file(53)
  292. xcv_depth(54) xcv_padlist(55) xcv_outside(56) xcv_outside_seq(57) xcv_flags(58)
  293. av_extend(59) av_pushx(60) av_push(61) xav_fill(62) xav_max(63) xav_flags(64)
  294. xhv_name(65) hv_store(66) sv_magic(67) mg_obj(68) mg_private(69) mg_flags(70)
  295. mg_name(71) mg_namex(72) xmg_stash(73) gv_fetchpv(74) gv_fetchpvx(75) gv_stashpv(76)
  296. gv_stashpvx(77) gp_sv(78) gp_refcnt(79) gp_refcnt_add(80) gp_av(81) gp_hv(82)
  297. gp_cv(83) gp_file(84) gp_io(85) gp_form(86) gp_cvgen(87) gp_line(88) gp_share(89)
  298. xgv_flags(90) op_next(91) op_sibling(92) op_ppaddr(93) op_targ(94) op_type(95)
  299. op_opt(96) op_latefree(97) op_latefreed(98) op_attached(99) op_first(102) op_last(103)
  300. op_pmreplroot(105) op_pmreplstart(106) op_pmreplrootpo(108) op_pmstash(109)
  301. op_pmreplrootgv(110) pregcomp(111) op_pmflags(112) unused(113) op_reflags(114)
  302. op_sv(115) op_pv(117) op_pv_tr(118) op_redoop(119) op_nextop(120) op_lastop(121)
  303. cop_label(122) cop_stash(125) cop_filegv(126) push_begin(134) push_init(135)
  304. push_end(136) curstash(137) defstash(138) data(139) incav(140) load_glob(141)
  305. regex_padav(142) comppad_name(144) xgv_stash(145) signal(146) formfeed(147)
  306. Abbrevations
  307. ------------
  308. bc B::ByteCode
  309. c B::C
  310. cc B::CC
  311. -D -DDEBUGGING perl, also used as d version suffix, eg 5.8.8d
  312. -nt not threaded perl
  313. 2014-01-15 14:48:08 rurban