3
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

php-master-changes 2018-08-07

Last updated at Posted at 2018-08-07

今日は少なめ

2018-08-07

weltling: Fix stack underflow in phar

laurence: Fixed bug #76713 (Segmentation fault caused by property corruption)

  • https://github.com/php/php-src/commit/2b1d79ce6661efdfae881884ca40b4ca7fc991e7
  • オブジェクトの配列を array_column() に渡した際、SEGV が出るケースがある問題の修正
  • 修正コードを見ると参照カウントを足しにいっているようなので、array_column() で取得したプロパティが GC されるケースがあったということなのかな
  • テストケースを修正適用前の手元の環境で動かしてみたものの、正常動作してしまった

pmmaga: Fix #76700 - Methods with altered visibility need to be added again

  • https://github.com/php/php-src/commit/fadbfbf8e131154071cdbadfe11c86842a031605
  • trait T1 の protected/private メソッドを trait T2 が as public で use し、 T1 を use する class A を継承した class B が T2 を use した時、当該メソッドは B のインスタンスでは可視性が変更され、public なメソッドとして呼べなければならないが、呼べなかった問題の修正
  • などと説明してもよく分からないと思うのでテストケースを見てほしい
  • もともと bug #63911 があり、同じ trait を use する複数の trait を 同時に use すると、共通部分のメソッド定義が菱型継承的な構図で衝突する、というバグがあった(継承ではないので、いわゆる菱型継承というわけではないけれど)
  • #63911 は見ようによってバグというか仕様というか微妙なラインだったものの、ともかく PHP7.3 にはこの修正が入っている
  • まず op_array のオペコードを比較して同じ関数なら重ねて処理しないという修正を入れ、ただ public/protected/protected の可視性の部分は op_array と別の部分でフラグを持っていたので別の不具合が発生し、そっちのフラグもあわせて比較することで、可視性の変更も正常に適用されるようになった、というのが今回の修正
3
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?