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

lost end of stream when reading StdioStream #35007

Closed
resetius opened this issue Apr 10, 2023 · 0 comments · Fixed by #35006
Closed

lost end of stream when reading StdioStream #35007

resetius opened this issue Apr 10, 2023 · 0 comments · Fixed by #35006
Assignees
Labels
Component: C++ Critical Fix Bugfixes for security vulnerabilities, crashes, or invalid data. Type: bug
Milestone

Comments

@resetius
Copy link
Contributor

resetius commented Apr 10, 2023

Describe the bug, including details regarding any error messages, version, and platform.

    auto input = std::shared_ptr<arrow::io::InputStream>(new arrow::io::StdinStream());
    arrow::Result<int64_t> res;
    char buffer[16];
    while (*(res = input->Read(sizeof(buffer), buffer)) != 0) {
        std::cerr << std::string_view(buffer, *res);
    }

StdinStream incorrectly counts the number of bytes read

Component(s)

C++

resetius added a commit to resetius/arrow that referenced this issue Apr 10, 2023
resetius added a commit to resetius/arrow that referenced this issue Apr 10, 2023
resetius added a commit to resetius/arrow that referenced this issue Apr 24, 2023
resetius added a commit to resetius/arrow that referenced this issue Apr 24, 2023
wjones127 added a commit that referenced this issue Apr 28, 2023
lost end of stream when reading in form of
```cpp
    auto input = std::shared_ptr<arrow::io::InputStream>(new arrow::io::StdinStream());
    arrow::Result<int64_t> res;
    char buffer[16];
    while (*(res = input->Read(sizeof(buffer), buffer)) != 0) {
        std::cerr << std::string_view(buffer, *res);
    }
```
the PR fix the issue
* Closes: #35007

Lead-authored-by: Alexey Ozeritskiy <aozeritsky@gmail.com>
Co-authored-by: Will Jones <willjones127@gmail.com>
Signed-off-by: Will Jones <willjones127@gmail.com>
@wjones127 wjones127 added this to the 13.0.0 milestone Apr 28, 2023
liujiacheng777 pushed a commit to LoongArch-Python/arrow that referenced this issue May 11, 2023
lost end of stream when reading in form of
```cpp
    auto input = std::shared_ptr<arrow::io::InputStream>(new arrow::io::StdinStream());
    arrow::Result<int64_t> res;
    char buffer[16];
    while (*(res = input->Read(sizeof(buffer), buffer)) != 0) {
        std::cerr << std::string_view(buffer, *res);
    }
```
the PR fix the issue
* Closes: apache#35007

Lead-authored-by: Alexey Ozeritskiy <aozeritsky@gmail.com>
Co-authored-by: Will Jones <willjones127@gmail.com>
Signed-off-by: Will Jones <willjones127@gmail.com>
ArgusLi pushed a commit to Bit-Quill/arrow that referenced this issue May 15, 2023
lost end of stream when reading in form of
```cpp
    auto input = std::shared_ptr<arrow::io::InputStream>(new arrow::io::StdinStream());
    arrow::Result<int64_t> res;
    char buffer[16];
    while (*(res = input->Read(sizeof(buffer), buffer)) != 0) {
        std::cerr << std::string_view(buffer, *res);
    }
```
the PR fix the issue
* Closes: apache#35007

Lead-authored-by: Alexey Ozeritskiy <aozeritsky@gmail.com>
Co-authored-by: Will Jones <willjones127@gmail.com>
Signed-off-by: Will Jones <willjones127@gmail.com>
rtpsw pushed a commit to rtpsw/arrow that referenced this issue May 16, 2023
lost end of stream when reading in form of
```cpp
    auto input = std::shared_ptr<arrow::io::InputStream>(new arrow::io::StdinStream());
    arrow::Result<int64_t> res;
    char buffer[16];
    while (*(res = input->Read(sizeof(buffer), buffer)) != 0) {
        std::cerr << std::string_view(buffer, *res);
    }
```
the PR fix the issue
* Closes: apache#35007

Lead-authored-by: Alexey Ozeritskiy <aozeritsky@gmail.com>
Co-authored-by: Will Jones <willjones127@gmail.com>
Signed-off-by: Will Jones <willjones127@gmail.com>
@raulcd raulcd added the Critical Fix Bugfixes for security vulnerabilities, crashes, or invalid data. label Sep 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: C++ Critical Fix Bugfixes for security vulnerabilities, crashes, or invalid data. Type: bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants