Skip to content

Handle broken hrtime in ftp #19219

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

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

Conversation

nielsdos
Copy link
Member

Part of GH-19210.

@marc-mabe
Copy link
Contributor

@nielsdos This basically disables the timeout feature if hrtime is not available.
Wouldn't it be better to either disable it completely via ZEND_HRTIME_AVAILABLE or, and I think this would make more sense, to switch to using a real time timer instead?

@nielsdos
Copy link
Member Author

This basically disables the timeout feature if hrtime is not available.

That's false, it only does on interrupt, which was the same (buggy) behaviour as before.

Wouldn't it be better to either disable it completely via ZEND_HRTIME_AVAILABLE

I don't understand this.

and I think this would make more sense, to switch to using a real time timer instead?

You mean a wall-clock timer? That's also wrong.
I don't particularly care about such theoretical platforms where high-res time is not available.

@marc-mabe
Copy link
Contributor

This basically disables the timeout feature if hrtime is not available.

That's false, it only does on interrupt, which was the same (buggy) behaviour as before.

👍 got it now

Wouldn't it be better to either disable it completely via ZEND_HRTIME_AVAILABLE

I don't understand this.

I mean removing the calls to zend_hrtime() via #if ZEND_HRTIME_AVAILABLE

and I think this would make more sense, to switch to using a real time timer instead?

You mean a wall-clock timer? That's also wrong. I don't particularly care about such theoretical platforms where high-res time is not available.

Yes, but I got the first part of the effected timeout feature wrong - so it's probably not worth the effort of a "better than nothing" workaround.

@nielsdos
Copy link
Member Author

I mean removing the calls to zend_hrtime() via #if ZEND_HRTIME_AVAILABLE

I see. That would make the code a bit more complicated: it requires two #if blocks. So I'm not sure this is worth it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy