Conversation
18a4241 to
3d23209
Compare
|
Thanks for the PR! This is okay, but why not use |
3d23209 to
e9a604f
Compare
I changed to pemalloc, I would be happy if you change it to PHP-8.0 ... who knows what will happen if I try ... |
|
btw. if I look at the define of
the persistent half doesn't look safe to me. |
I can do, but usually its easy to do:
Ugh! |
e9a604f to
d3f332a
Compare
|
|
||
| if (!scope) { | ||
| scope = malloc(sizeof(zend_ffi_scope)); | ||
| scope = pemalloc(sizeof(zend_ffi_scope), 1); |
There was a problem hiding this comment.
you might need to mirror it in their freeing counterparts.
|
|
||
| if (!FFI_G(scopes)) { | ||
| FFI_G(scopes) = malloc(sizeof(HashTable)); | ||
| FFI_G(scopes) = pemalloc(sizeof(HashTable), 1); |
I've filed #9128. |
| static HashTable *exif_make_tag_ht(tag_info_type *tag_table) | ||
| { | ||
| HashTable *ht = malloc(sizeof(HashTable)); | ||
| HashTable *ht = pemalloc(sizeof(HashTable), 0); |
There was a problem hiding this comment.
This should be persistent. ht is later stored in EXIF_G(tag_table_cache) which lives beyond requests, as far as I can see.
| if (ip) { | ||
| ip = strdup(ip); | ||
| cur = ip; | ||
| char *dup_ip = estrdup(ip); |
There was a problem hiding this comment.
From what I can see this functions is called from fpm_php_init_child which is called indirectly from main outside of request context. I guess this should work fine if the allocator is started, I'm not sure which one is preferable.
| int ret, len = (int)strlen(message); | ||
| char *buf = malloc(len+2); | ||
|
|
||
| char *buf = pemalloc(len+2, 0); |
There was a problem hiding this comment.
Same here, this can be called outside of request context.
|
@hwde Could you please rebase this on top of PHP-8.1 and address review comments? |
No description provided.