-
Notifications
You must be signed in to change notification settings - Fork 26.3k
Fixed seek offset size to 64bit. #27047
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
Change-Id: I71aa665ecc7afae16c3b553ed73ec3c11797ac30
Summary: Fixed seek offset size to 64bit. Change-Id: Ie4a5a4713c4e0b7b8c31f9b79db06f7bcd236ce0
|
Could you please add a test as well? |
Change-Id: I76fcfec78fa990dfd1f716b9c82ac40aad9d1507
|
@peterjc123 |
|
@yn4bit That's great! Thank you. |
|
It's a little bad since Windows tests are failing on master but I'm going to optimistically go ahead and land this. |
facebook-github-bot
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ezyang is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
Summary: Fixes pytorch#26998 Pull Request resolved: pytorch#27047 Differential Revision: D17666050 Pulled By: ezyang fbshipit-source-id: f02ebd5320ae25f8949be20d0744fe3cd3e2fee9 (cherry picked from commit 1afe3fc)
|
There's something wrong with the tests: |
|
I'm going to revert this for now until we figure out what exactly the problem is |
|
@yn4bit This one gets reverted, could you please figure out a new one? Update: Let me do this for you. |
| // the file descriptor is returned to original position and | ||
| // the file handle at python call-site needs updating to the | ||
| // advanced postion | ||
| const auto fd_current_pos = lseek(fd, 0, SEEK_CUR); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After reading the MSVC document here, looks like we need to change the function too.
Summary: Fixes pytorch#26998 Pull Request resolved: pytorch#27047 Differential Revision: D17666050 Pulled By: ezyang fbshipit-source-id: f02ebd5320ae25f8949be20d0744fe3cd3e2fee9 (cherry picked from commit 1afe3fc) (cherry picked from commit 5846008)
|
@peterjc123 Thank you for your comment! I think lseek is certainly suspicious. Python portable_lseek () is as follows, so I think that it needs to be changed. #ifdef MS_WINDOWS However, since OSError has finally occurred, I think that the cause of the direct error is the value passed to the Python seek or a restriction inside Python. I would like to correct this after analyzing the generation mechanism, but there is no Windows development environment at hand ... |
|
@peterjc123 Thank you for your testing. Wow, this is a surprise to solve the problem. I don't understand the behavior of Windows ... |
* Fixed seek offset size to 64bit. (#27047) Summary: Fixes #26998 Pull Request resolved: #27047 Differential Revision: D17666050 Pulled By: ezyang fbshipit-source-id: f02ebd5320ae25f8949be20d0744fe3cd3e2fee9 (cherry picked from commit 1afe3fc) * Use _lseeki64 instead for MSVC (cherry picked from commit f49f78d)
Summary: Fixes pytorch#26998 Pull Request resolved: pytorch#27047 Differential Revision: D17666050 Pulled By: ezyang fbshipit-source-id: f02ebd5320ae25f8949be20d0744fe3cd3e2fee9
Summary: Fixes pytorch#26998 Pull Request resolved: pytorch#27047 Differential Revision: D17666050 Pulled By: ezyang fbshipit-source-id: f02ebd5320ae25f8949be20d0744fe3cd3e2fee9
Fixes #26998