Repository navigation
Commit 77dbc2c
committed
ext/opcache: Mark dl()-created persistent strings as thread-local
During a request, opcache's interned-string handlers return a plain
persistent string when the name is not already in shared memory. dl()
registers a temporary module's function, class and property names this
way, so under ZEND_RC_DEBUG the first refcount change on one of them
(building an argument TypeError, ReflectionFunction::getName(),
get_object_vars()) trips the persistent-string assertion. The strings
belong to the request's temporary module; mark them GC_PERSISTENT_LOCAL,
but only while zend_rc_debug is off, as dl() turns it off, so the check
keeps covering strings that may later be shared.
Closes GH-244211 parent 1fb0b45 commit 77dbc2c
5 files changed
Lines changed: 71 additions & 7 deletions
File tree
- ext
- dl_test
- tests
- opcache
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
23 | 24 | | |
24 | 25 | | |
25 | 26 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
578 | 578 | | |
579 | 579 | | |
580 | 580 | | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
581 | 588 | | |
582 | 589 | | |
583 | 590 | | |
| |||
602 | 609 | | |
603 | 610 | | |
604 | 611 | | |
| 612 | + | |
| 613 | + | |
605 | 614 | | |
606 | 615 | | |
607 | | - | |
| 616 | + | |
608 | 617 | | |
609 | | - | |
610 | | - | |
611 | | - | |
| 618 | + | |
| 619 | + | |
612 | 620 | | |
613 | 621 | | |
614 | | - | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
615 | 626 | | |
616 | 627 | | |
617 | | - | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
618 | 637 | | |
619 | 638 | | |
620 | 639 | | |
| |||
0 commit comments