-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Fix #81145: copy() and stream_copy_to_stream() fail for +4GB files #7158
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
Conversation
When mapping the file, we need to pass the proper `dwFileOffsetHigh` instead of `0`.
How slow are we talking here? On Linux the test case takes 2s, is it much slower on Windows? |
Takes ~50sec for me. Lets see on CI. (see also https://bugs.php.net/bug.php?id=80695) |
Well, seems perf depends: Linux (16s) vs Windows (9s). Anyway, the test makes sense. |
FWIW we didn't add a test for https://bugs.php.net/bug.php?id=80523 either |
Co-authored-by: Nikita Popov <nikita.ppv@gmail.com>
Test fails on 32-bit Linux:
|
We can't copy files > 4GB there, anyway.
Ah, thanks! Need to skip there. |
@divinity76, PHP currently only supports some 32bit and 64bit architectures. To support other architectures, would require many more changes, so adapting this test as well shouldn't be hard (there are already ~200 other tests with basically the same SKIPIF clause). |
When mapping the file, we need to pass the proper
dwFileOffsetHigh
instead of
0
.I'm not sure about adding a regression test. That would be terribly slow, but given that I missed this issue when fixing bug 79423 it might make sense to have one.