Commit d7b9b3f
committed
Return an array instead of string to test memleak
The CURLOPT_PREREQFUNCTION leak test returned a constant string value.
Under opcache optimization, SCCP/constant folding may turn this into
an interned string, which is process-lifetime allocated and therefore
does not reliably trigger leak detection.
Use a dynamically allocated array containing random_bytes() instead.
This guarantees a non-interned, refcounted return value that exercises
the missing zval_ptr_dtor() path consistently under leak analyzers.1 parent 9c443c9 commit d7b9b3f
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
80 | | - | |
| 80 | + | |
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
| |||
0 commit comments