Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix GH-15701: fopencookie seek callback signature offset argument mis… #15702

Open
wants to merge 1 commit into
base: PHP-8.3
Choose a base branch
from

Conversation

devnexen
Copy link
Member

@devnexen devnexen commented Sep 1, 2024

…match.

@devnexen
Copy link
Member Author

ping :)

@devnexen devnexen requested a review from Girgias September 15, 2024 20:28
@devnexen devnexen requested a review from cmb69 November 9, 2024 08:55
Copy link
Member

@cmb69 cmb69 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not generally against this change, but I'm slightly concerned that we may cure the wrong symptoms here. That is all quite contrived. We use zend_off_t, PHP_FPOS_T, off64_t, and off_t pretty arbitrarily. I think it is more important to clean that up (maybe master only), than adding work-arounds for ancient OS versions.

@bukka
Copy link
Member

bukka commented Nov 9, 2024

But glibc defines

typedef int cookie_seek_function_t (void *__cookie, __off64_t *__pos, int __w);

(documented as int seeker (void *cookie, off64_t *position, int whence))

So now you just use fpos_t to be equal to off64_t which it is but this makes it kind of messy. If there are difference I would prefere to create a special type for cookie_seek_function_t rather than reusing fpos_t.

@bukka
Copy link
Member

bukka commented Nov 9, 2024

Shouldn't we just always use off64_t or some wrapper around it? Are there any platforms where directly using off64_t with IO cookies wouldn't work?

@cmb69
Copy link
Member

cmb69 commented Nov 9, 2024

We should at least unify zend_off_t and PHP_FPOS_T.

@Girgias Girgias removed their request for review November 9, 2024 14:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants