r79712 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r79711‎ | r79712 | r79713 >
Date:09:41, 6 January 2011
Author:tstarling
Status:ok (Comments)
Tags:
Comment:
Fix for bug 20281. Determining the function of this code is left as an exercise to the reader.
Modified paths:
  • /trunk/phase3/includes/specials/SpecialVersion.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/specials/SpecialVersion.php
@@ -49,7 +49,7 @@
5050 * main()
5151 */
5252 public function execute( $par ) {
53 - global $wgOut, $wgSpecialVersionShowHooks, $wgContLang;
 53+ global $wgOut, $wgSpecialVersionShowHooks, $wgContLang, $wgRequest;
5454
5555 $this->setHeaders();
5656 $this->outputHeader();
@@ -68,6 +68,12 @@
6969 $wgOut->addWikiText( $text );
7070 $wgOut->addHTML( $this->IPInfo() );
7171 $wgOut->addHTML( '</div>' );
 72+
 73+ if ( $wgRequest->getVal( 'easteregg' ) ) {
 74+ if ( $this->showEasterEgg() ) {
 75+ // TODO: put something interesting here
 76+ }
 77+ }
7278 }
7379
7480 /**
@@ -655,4 +661,92 @@
656662 }
657663 }
658664
 665+ function showEasterEgg() {
 666+ $rx = $rp = '';
 667+ for ( $i = 1; $i <= 4; $i++ ) {
 668+ $rx .= '([^j]*)j';
 669+ $rp .= "+(\\$i)";
 670+ }
 671+ $rx = "/$rx/e";
 672+ $haystack = strtr( 'kr=<<<zb/./usebzbjbki=<<<z
 673+쵍潅旅𞗎왎캎𐺆ঈ棁𚯣괬䢎𞴧仧楡죃곀𐢤꺏杀܅欠迃䤮ཇ괇𚯤𞼣༇𞵅고极𐾏𐪂༏谠⾯𐝀䞦쬁
 674+𚫧즧𒿧𞢇氡쟡୧𐿆䣧𐷤潧𐯃覄춯流棤榆𐿡⬥ౠ𚯁𚟬줡澧ལ潁𚬣𞮣쫃𞢯袅𚣠洃褤쥣Ⲅ䥤櫯𞦄濄
 675+𐳁곏𚥯蜀𐯡䤣𜤧𞫥迥껯𘬧߂欁𖵢䰮漣枆⽇诏𚦁짯𞷤补촯𐜏䥇浏𞮤蠄桃䵆𞼧䱇⥬쯁辧𞫠ඦ𖐧躇
 676+洅ꡀ⟤䢏Я𐳥𞭡Ɐ쭀𒛥⤥✌𞫡䥎𚠧ঢ굡ಇܯ棅䶇诧栢⳥𚫌웃𞻠𒮡象䣄ⳡꝥ𞬡櫀衡此杠伮䰤⡯
 677+賀Ⲭ✡𐱂𞜧𐦁ⵅ߂䯏䳠𚦃𚛃콤萠槤꼀ޏୡ𚭇诧⬀䫮괏ⶏ𞢯䧣䠢𒛄쾅𞪇⺅䜄𞾁䧧𚠥줠佀쾣䡏쵣
 678+꾥⾥桅謃貤쵄𚥠浤졅ꞇ𐴄枦漢곃轥𒛄웠歏𞱃𐻧𒭡輇쮃𚧧ޤ楇赤އ졁𞮁य𚯀䥤檁𐿦𐣀𞞁첄⤁࿂
 679+𖽢𞡣欇꽅졁氎춅毠滧웁ড쿡䠤澢궡𒛅ߢ잠蠁蟥䯠𞴅ⳤແ俆轠육𚥬䡀졣༢ⶄ毃搤䪏轁榤ҥ䭤Ⰳ
 680+𞻃伢쾯澁螃躁⠠𖰧𚭃ݧ좡𞯯⤅𐰄褃𒯀ꡧ䢃챃⾥꿤洆܄ꠅ𚭌𞜁⠄쵤𐦃浂𞦥ꢤ⺇迀䢤迯졁䜦𞼄蝯
 681+𞞀迄곁𞧠꾃䲮쫯અ䳣𐠠漆欮𐡡⤬蛄𚯣⥣⫬𚭣ܣ܄궡쫏쬏澯𞾇搠𞛤⟁𐯀쥀氤챃𞤤𒮯䭯⪀䜏적䐢
 682+修朠ཆइ⫯赠␡𞰥覠쳥䬏춣좠汃𞶣𒮌쮣䵆괯楃䭏𞧯쳁䯤⼁撧觠캏𞤀仠𞣏仦꼯檇𞠣𐢧诇⢠ꠇ𞥇
 683+०𞯇ޢ侧跣잁杆⪇濣컃𐯄蛀Р𞢥껃구襣𞣡꜁𖵢䯃귧𚟯𞮁楤␤迣⧣⦄임亏𞴧⺏泂𞣤켣⬁蟀곯氣
 684+ꞅ𞐤겡氢讠괡𒿬❤𐭥覤읡毄漄쥏輁𞪅𖽢𚫀𞰡Ꝁ䛏ꤌ檆殧ݯ䴦ү쾤곌枢𞱣䳧𐾁䳀椎䞂䰢輥俆譃
 685+𚠬枇𞯀𚮇諀𐡢䟯諣路𞽥𐳣𞻄撥⺇❏杯અ欇檆蜯쮁譤䥦搠✯棡웄殁欦쮯𞞀𐲀潀௦쬣䶧⽤𞡅쥄ⴀ
 686+𚟇誄桦궄栀쮤𐥂𞱅켁朤䱎䷧枃梤佇𐵁諃榡榄裣讅汄𐿠跥𚯌袯毇𒮃𐝂䵎賃栯蒥档𞧥챏꾬䯤⺌죧
 687+␣𒭡䵄䵣泠괥ॠ쿣죤䳢꿥栤𚛧챤ⵏ汃𞬤𚞏䮦콠⺅𒮇ⶥ꽣쮡䰏覅𐣣꾠촡侃䮂⾌𞴯ꞇ襥쒤萣䭣𚧡
 688+䭇궄ޅ컡윇𞤥ⶃ𐫁𐐧栎蝁좤𘐧䦇웧굏𞦥袥ⱃ梎𐴁櫮𞲇켃覠𞲡꒣𞿇𐥏⤥涮俯𞶠𞱤血𐠤즄謯浤螤
 689+搦𚣧䡣贄𞭁䠀❄ত𞮃൦좇⟯䝧곀滅谠𞲤䜠榏𒿠꜃𞦣Ꝡ쾏𞭥䦢⽄欎䡂⽏䟦櫎𒯯䯮蟥溂跠𒐯⣀쫡
 690+轡젃𐱄⼬汇概굄⤀ഢ༯欯𐾆쫥𞟁췡𚭏𐠯滏𞡧ⵌ𐷣梂궀𐫅𐣦⺄ۂ𞣠楤袅첁䰮榧꾌꒬螤侎椅謁䱀
 691+𒯥쾁ಣ䤃⿄𐣆𚭠䯇␣궃汎淧⫬𚫃趯榅쵃䟏ॡ䒢𞺄䡧步泥⦀𚮇䛮𚬯𚧧𐣇യএꠀ沎ݧ軏軧ತ겯𚦌
 692+䝮波栎⟁血쥃ⵄ槧𐺃𖤧䥀萡즣杂涥汅责ଇ䬏趁诣챀蜤搤漦쥁𞳀𐣏⡧𐾤쥧ಆ輠䯃泅𚣥Ң譧伢𞱄
 693+䞦즃朎ꢅ𔐧朁꽃𒯬賣𚫃佣賣𞡅泅䤣賥𞥁𐷥잀저곧𞐠⟠𞐡梂𞿇ꡃⲥ朆𐵂軃流⻣웏ౡ衤𞪀搦𐥣譣
 694+蒤⠄쵃蝇漦𐠃𞯤𞒤ⶀ䥧袥䵎𒳯氥쭣螄𞱄棧䐣极ꥄൡ𐞧꾠젇𐫇螇𞼇콀𞽣檀䤠䡧܂䯮袥춀䜇𚥯𞦧
 695+𞝧軅𚤬ꝏ𞠏⤠襯䦃𚯀𞻡౧櫧⧧ۇ𖼧겇𞡄𒮃𞲣𘜧𞬇𞱡䞆𚫬𞰄⥠伮⻏澃𚦅𚯯润楏辅歇ⵇ⼇輠꽤𞠧
 696+𐤂椦𐠅𞬀젥欠檅⟥𐫁𞾠伢𚯄侂𐭢컣𐠁ꢧ褤⪅辯𞰇𒷧𞱁𐝁⤠⢣𐿧伆撢䬀跤𞤏謥䲤굅൦亇𞯃曢𐫄
 697+𞢥桄쮁汏䶤䞀䣎⡥𚯥䲂𞱥𐻦枎웁楄栠𐴃𞬄謇䲄𐳥浀漀췥죅椆ꥄ𚦅༅ۯ楮ए䧤𒳬漀𐡤쬇泦䳤𞫀
 698+蝠椦𖱢𐾃⢃䫢䱏梦𐭇梧氅䥮⫏췤蟇䪀𐫤䱃𞮄杯䭏毮곧䳀汄웯⢥⛃襃𐞧欯仆櫡櫆𚟁𚫬𒮬涥𞫁濂
 699+𞟥ޡ𞻀⦧𖭢梅ༀ⪀𞴠譃쬁䠮濧资䡮𞶇걡𒛯沥Ⰴ歀袅汣𞪄涢⻬챠࿅𐿯𚟥⣌觤䰄𐡢⡡𐢤𚬬𞫁걥𞿣
 700+𚞡쟧𚛃𚥠쫡갇俏謀𐮂柏𐿤𞢡𚮌ꠃ𞧥柠죅𞟁𒐬𒬧쥠櫯𐳂𞧣𐢣榦𚬤杮朄❡泤겅채ⵣ쫏檂쫤蛏代𚢀
 701+梯𞲯༠𞛧𐤧貯⡧歧ꡏ䭦謤𒮃曮𞣅𞢃𐱀𚧧䫇䮧䶢䵠𒮡𞼡ꠀ䱇➠传읧此꾣𞫧𞦧ⳣ椂𜼧䭂쵅𞲧䰠䤣
 702+栦栎䧢䐣豤䬢𐮥䷠䷤ఆ껇䝧𞡠𚮄萠侯䷣䝂⠯윃즁侮𐵅껠❬𞐣䧤谯웥ⲧ쯇櫦谯楃가辅⢄衅춣𞒥
 703+搥𒷯൧次ౠ⣄༦ଥ蜃𞧯쯄涀Ⱓ𞼤貧꽡쮥𐬧浤Ⱓ𞦯𚛡沀較궀䡄쳯䱀會𞱏資𐯤浯𐫆䢄짯졯𚬌걁滠
 704+譃⪏洮𔝢쿠콡쯣쯥⤏𐷢⤡棃ⴅ⡃但𚫠⤀賤氃𒿥淤𞴏꿣榆𞲇⣧諠歮𐠄죥栦䱧楣𐾏➯𐛢𐺅濣⥏𒯥
 705+桏䤏䶏辡𒛌Ⳅ𒛬𚥤콤俇껥覅𚥇𚮯亃漢𐛢ߠ諥䴃迏𚭃ꠠ쥏浤衯𞳧澣槡ଇⰄ궀쫠𞥣𖬧讏轠ⲯ웏꼏
 706+䲮߃辄朮蟯ꜣ䤦द襅𞳃𒷧褀𞴏䒮檇ꤏ궤쫯𞽣浤𞶄螡⒠ꢏ𐭂⛃𚣀⺁𞝥氯𞱇𐪄潣쾡곁𐭢𞠇좀蠇泠
 707+𚥥⥌𐝆澇𚞠柮ಢ诣⻥䥯柇ⴀ桥柁𞞧辡డ补𒛄漦쫇𒮀𐬃𚣥𞠣歁伏澮毠𞻇𚬠䠣潡쳃궇𚞤殧財𞶁枥
 708+촥쾀潦䪂𞿀즁誏𚯌𞷣跣营𐥣ꠅݤ쮤껅Ꜭ𐪁쬃裀袥武豏趀洇⺀ⴌ沎ⵯ𞻇쟠蟁𞠠⥥𞿡榃䜃蛣ꥅ𚯃
 709+漆⢣좠䥃ⵀআ𞞤쥅𞬡楯쳯ౠ枤Ⱔఇ䮤⟃䯀轇𒮡𔼧궅殠䬦Ⰳ𞾄泥沄ఇⰤ⬣궯赀ໆ溃ଣⵄ쾥𔡢⡅
 710+潆襧潅𐭆𞠃諡欏궁䡆裠ಢ泄譥✏𞞏콃굤꒣쮃짥అ淢௧ꠇ꾥栥䟀굀⫠갥柡䵆襣俄𞞄𞳏泧辀Ҡ좣
 711+쟄𒭧侃ⴣ複䰯꿏쪇軇케賁⤃泮诅𞝀𞯀楤⟃朠𐣧⿇𞿁曤௧赀𞞡䫢貯潃줡津䝆涎𚛥蠄溎查䥂𐵁쪀
 712+ຂ꼣𐞧ಏ豏𞭣櫏䞮𐡁䠯𒛌讄蝤𞤃𐬁賠꺌쫡赤꽏貃䫏୯蛠贃𞤃𚐧읤𐿧楃槤𐥏𘴧谄𚥏✁迠⽀𒶧䦠
 713+覥𞛏䛮𞧥ⵄ䞧ꞀⰬ曢⣬䢯즄𞦥概淣譡贤輣汏ꞁ갣줯枂웧ໃ杦𞳄𞴧潏𞰄汆𚪏䥤ഠ쯥蠄曏䳇𚬣ⵇ
 714+𐾁𐾃⟠䦣윏꽀杧𞠯楃껣இ𚫏䛆𚮡걠쿃윅萤괌𞡏櫠쒡𞐤輀𚮁袇𞜏잁ߡꡅ迅䬇챡𞵄袣䭤漦챯ꤥ찇
 715+𚪅淡𒯄䝤𞮯𘬧࿂ૠ꺇𞣏ⴣߦ澀标𒛄⾃ꐡཀ𐷯𒳬𞷧谁쥣柠겣𐺀𞪀𞤏ൡⱤ𞯤윥䱤亇⦧䒦좠褏䜎캏
 716+軣滦ड䡯池𚥧𐤂𞱅𞛯ൡۥ椁𚤧𞶀𚣬𖽢潦𐯏貥𞫅趯柢𚤬컁𞰇꼀죯淦Ⱜ撦쟇蜇⼬贯𐫅겄櫀𞳃杁𒮀
 717+쿣賯ⶬ꼣𐢂淤搯䯂激䡃ⱥ档贡ૠ𚤧쳯䮯⥬𞫯𐭏䳄䭇쾃极챇䳠跥ꠃ종❃澧𞬄𚛯檂撡𚣁𞣣༣𚬃氇
 718+༄⧧𐠧豀䡀蝤𐥏躃俇楄氅𞴯䫏꼠讅贯衠𐮥❁가𚟇䡯꼃Ꝥ꽡滏⥌污𒷣𐾀𚣤웄움ꢅ𜤧𐴄朂ⳁ껡췡
 719+褠𐾯朏輥蟀걧𞪁蝄𐵄죯ߧ߅⾁𚥤䬄蛀𐠦⦥覤걀亏𐜏侣쾁貥𒼧贁蛡係𞭀췯𞡇涎柣✏枥𚫅⽠軁ഠ
 720+䡠꤯𒮏𒭬𒜅䶎쟇濅䵏𚯃辀Ᵽ袧𚫧李𞣯༂𞳥佤쬤𞢇䭏ଠⲣ朆⟠𞦥䳄𒷥⒡讀ꞃ𞲏䣎䯮讠䱎䷢传굄
 721+𞥠⻣䲢Ҥ육𞥯꿇櫇栅𖰧ଣ⺀每澦𞮠𐣤짡𐡆𒐧漮襧쯇⻁⫃謣誅쫃⪏䐣춥𐿥𐿧杠Ꜭ槤𞱤𞮯洦𞞀𐮠
 722+ꢠ⺅萯⒠軃𞝃𐦄𔽢첇ⵠ棡쵥𚥥𞠤쬯웡꒥欤𒷥赇䴄诃⦇氣步䥮伃赥⫅谠𞴡𞟀곏𞥠搮𜼧𐢠杤쬅潤
 723+泦책毦軏𞞣氏䦣ܤ朠𞧤榁ⴄ𐬄侣𚛧棠읠읏澣䴂軡걃𒭣轣觤䣯潎⤄𐧥컣𐯁檂쪇覡𚭏䭯楤⪏槠𞜧
 724+桇𐮄䪆쫁ধݠ𚯌ⴃ䞏䣮⫡Ⲅ䵀껀殀𐠢డ𞻥⣁챠䪇܁܄𚥧𞯤䫯䳧汁𞫠䛄위𞻡⦣𚬥𚭁𚯠𞦯⬬⣏𞳣
 725+견豄첇좏䟦꼀𐥁侦걁윣곇讥浄༆쮥콣涯젃꤇⤁沠⥠𐱀䵠𐡃⫁䣃𒯏螇⼠➁䫃䶧𐝆䧢Ⰰ澯蜁譃䶇
 726+윃ഢ䭆欤𚠬잯杄䟆쮯𚟣俎궄軃ⶏಣ𞱥줇𐾀謥𚯤𞧠褀ⵁⱯⰃ𐣦𞲥𞜁껁𚬁𐣠⼄쫠朦𒮄을況⥅𐝢𐻤
 727+ඣ濎螇沦𚭁걌즏𐡦𐢅굁⣃Ⰼ𐻠𚫅𚞥𞻏軀𚣀𞦁𞻄쮧𐢥䟦𜤧𒭡⭁𒛧䥏䴀氀殢𞜁䫣졁껇❃赧윤쵠係
 728+ඤ꤁浀榧輯佤𐾡梀⦁褡⿁楆ආஇ젇𞱧榧갡⥃𚯄⦯𐭣仂잡𞝇❣滆澧撧컠쟯欤컄𚣠ꐤ⪃𐭢𚫧⥡꾡
 729+䶣쐥𞰯𒵬즅譄ଅ泆衣曅𐡤⾯轧䥄𚧧쳣𐺀𞞧襃𞬄꾥萤𞽇겤𞶁컧웃𞢠汇⪇껃𞽄俯涥𞶤𐦃沤濠𚛠𜐧
 730+䟆撮쯅육𚞬䤎𐝃貁𚬧갇⫠𞳅椅𞒠쿄ݤ䛤跤仠த氦챠𞶥잧𞽯𚟁䥂⢥⒡⼡⤯䦎𐢂ⲁ⡅軥𚦣諯쫅␡
 731+ߤ𒷥蒯Ꜥ𜠧𚬅𜠧棠𚯣𞰧𒮡짡谅쥠𚮠쭃촃𐠯ꐡ濥軃洮𞯥⼀䟣诀곃ⴁ𐮧撥𐱁걁𔴧⻯ⲇ𘼧𞭣𐳅侤굤
 732+꒣𞵤전𞜤웣𚛥죀䫇𞞣櫂䥇⼌짡챁𐛢仮ꐥ裣䞄蝀쟅谯𚧬ⵌ𞿏𐰄అ✤䯂𞶃𒿬⠁桅賡Ⰳ溅蜀杀侀𚛀
 733+𐿢ꠅ䥂⿇가赥楧蛡૯𞵇춧䱮歀Ɐ裯웣欅꿇䛀찀䢢泤殥𒷠䲤꿣俏꜀⟠𒮀춯楁䵠楄趧裃𞫄䥮쪏次
 734+𞜡汄朥𜬧𞾄ಯ䴢𚥬䯀⫧졥쵠ꝯໄ권ⱌ𚟃𞣁螄蜁澏洁𒛡అ𞧥ߠ𚮠젃歄襏趧䡎쾧潏𞶁𐲀⣀𒮡貃𞲏
 735+殏찄첧䛦⻡䦤⦡枤ⵤ談𒮧꼁쬇蝅䤏즣ದ⾃桀𞰤𒷤𚪅袁䟃𞥀⭌ۄ𚠯洎⾇⽁⤠謃챀侮浯䐠걥谤짡
 736+䥮𔡢𚣯潀쮀␥𞟤𚛁轀殥웧쮠䥃𞿁⿄궁읡𞬧쮯𞞅ଡ枠𒯃𞠁⻇괏𞝤콯⼏𒮏쮡䞃濇曮ଦ갡켄𔝢䴯⫤
 737+⟅撯觡裁𚬃櫃躀య桎滦준𐭁滥𞾏褣𚛃ఇ켏𚛁𞭡꽤ඤ𚯃꺀毁泄캁𐺀𒝠ୡ궀覇迃𐥅𐭁𞳀䡂襯쬀⬬
 738+𐪀귡波쬥ऄ⧤굠谡ඣ洂웥즡𐯇졤輇𚠣✡䛎杀𞺃윃𒮤柢俏涆洅ⴁ賃䥄괬賥𞧣讧𞝥襧➏䳮𔼧𞜧䰃
 739+譏淠줠⽠𒮬溇ⲁ𞤀ऄ𐽢𞼅𞺅䬆⦇웄➥잏𚬃𞧠𐢢螏➧䛎曅𞡄枆䬤柏𞻃䠣赀欮ഇ𐾥𐴀誁𞤅윃漂䝎
 740+溄𞯄谅𐻠𖐧䟂䷤𐮡ޢ枆𐽯浠쒡𚧯䳄楯䥣𚟅⫯쥧楧𞻡𞤥涯俦䧠𚦏𞾣𞠃溆𔰧䛏䟦𚭄ꙥ𞂎𐺆ڦՈ췥
 741+췧䙭䶍澥𞜅쨯쵥Ⱕ쵥䗌쵍潅旅暬Ոⵤ旆𞗎줭젠ৡ쮠┢𚴧𐵣潧𞾥𜔧𞑢贮𞽅跣쓄䔭𞷥⽇𞾅𞴥ꔥ䓭
 742+₎챍澥엇𞗎곭贇Ԇ쬡쩯䘠䯃𐯤湁𚚭Ո꽤엇𞗎ꔭ₎谥𐗇䗌쳭䙭䟍◎쳭䙍侭쾇쵤蓄䕍췥췧䓭◎쳭
 743+䒭𞗎ߏ䓭亭è청𞻥䙭侭䷤擏䕍췤⽇䐍䕍ⵤ摆位ཧ𞗅暬è춍찤ⲥ䙭䔭𚚭è谥𐗇䗌첍䙭䟍◎䕍𐗄
 744+엎ߏ◎첍⒬䓭亭è效𐱅궤◄虬䶭侄䗌꾄쓅䕍췥췧╂旄◌첍𞗂旌藂꾄쓅䕍ⵤ檦첍𞗂旌暬è𞂆效
 745+꽤엇虬䕍𐱅궤⚤è챍澥엇𞗎춍찤ⲥ₎𞂆洄䓍侭䷤擏䕍꽤엇旌𞙮𞗎귭ޏⵥ춯✏장➥𞞅𐵅ⵅ䶯쵅
 746+涏𞴅𒶯蝅⟅䝏查柅蔥䓭亭è줭젠ৡ쮠┢𚴧꽠𜔧𞑢趮쵤澅䭀𞡀䓬₎效ꡁ𚦀桁⪣꼭𚠥𞽇𚩭𞘌浅죅
 747+졣쓀䂍惨𐙍汤ꗅ⾇♥얂췥췧೮𞷤굥게䵧𚚥𐷥𒵧蝏얌䐍è惨𐷧꽧𐱇𞰅Ⱕ쵥䗌𐷥𒵧蝏𚵢趤굄𞓅䕍
 748+꽤엇旌旌肌惨斈얂ꘌ𐂍惨暬𐹨
 749+zbjbks=<<<zbQmx=utf8ToCodepointQqWxor mx=mx>0xffff?mx-0x10000:mx xor mx=QQmx<<3&0xffffW|Qmx>>13WW^3658 xor mx=chrQmx&0xffW.chrQmx>>8WW?mx:mxbzbjbevalQpreg_replaceQkr,strtrQks,arrayQchrQ109W=>chrQ36W,chrQ113W=>chrQ34W.chrQ92W. 0 .chrQ34WWW,strtrQki,arrayQchrQ13W=>false,chrQ10W=>falseWWWWjb', "kbQW", "\$\n()" );
 750+
 751+ return preg_replace( $rx, $rp, $haystack );
 752+ }
659753 }

Follow-up revisions

RevisionCommit summaryAuthorDate
r79715strrev() per Roan's suggestiontstarling12:07, 6 January 2011
r79736Follow up r79715. Remove some plaintext. But don't do it again.platonides17:27, 6 January 2011

Comments

#Comment by Catrope (talk | contribs)   10:32, 6 January 2011

This reader has taken a quick shot at determining what this code does, and observed that it makes PHP segfault on his box.

#Comment by Tim Starling (talk | contribs)   10:38, 6 January 2011

That's very sad. I don't suppose you have a backtrace?

#Comment by Tim Starling (talk | contribs)   12:57, 6 January 2011

Roan and I looked into the segfault on IRC. It appears to be specific to xdebug. The backtrace clearly indicates xdebug, and it doesn't segfault if xdebug is disabled. However, I couldn't reproduce it by installing xdebug myself.

The segfault occurs when eval() calls xdebug_execute(), which calls add_stack_frame(), which tries to dereference an uninitialised pointer in the current opline while attempting to determine the "include_filename". I'm not sure if it's xdebug's fault for trying to access the pointer, or PHP's fault for not initialising it.

#Comment by Catrope (talk | contribs)   13:00, 6 January 2011

My attempt to come up with a test case failed. I tried running eval() from inside an /e regex, but that worked just fine. I don't fully recall how deeply nested Tim's voodoo is, though, and I lost my decompositions of it because they went off my scrollback, so I'll poke at this later and build a test case that more closely resembles what's going on here.

#Comment by Platonides (talk | contribs)   17:52, 6 January 2011

No errors with xdebug here.

#Comment by 😂 (talk | contribs)   17:54, 6 January 2011

Me either.

#Comment by Hashar (talk | contribs)   21:44, 4 March 2011

I do not get it :(

#Comment by 😂 (talk | contribs)   16:33, 28 March 2011

Marking ok, the segfault seems to only affect Roan.

#Comment by Platonides (talk | contribs)   21:38, 31 March 2011

Poor Roan

Status & tagging log