STATUS 13 KB

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