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

Parse output error on Mac. #137

Open
Ulmo opened this issue Aug 26, 2018 · 0 comments · May be fixed by #197
Open

Parse output error on Mac. #137

Ulmo opened this issue Aug 26, 2018 · 0 comments · May be fixed by #197

Comments

@Ulmo
Copy link

Ulmo commented Aug 26, 2018

Here's a jsondump parse output error on Mac that I don't get on Linux:

Source file:

curl.txt

Here is the buggy output on Mac:

curl-bug-out.txt

Here is what the output should look like, what it does look like under Linux, and what it looks like afetr I hacked a bug fix for Mac that works in my application into it:

curl-out-correct.txt

I was able to hack a fix for it on Mac in my small application by replacing BUFSIZ with (16384) on line 69 of jsondump.c since my files are under 4K. Obviously the buffer read error bug is still there, and should be fixed, but doesn't affect me right now.

I think #125 might be related.

Addendum:

I just tested BUFSIZ in my Linux and on my Mac. In Linux, BUFSIZ is 8192, and on Mac, BUFSIZ is 1024. This is clearly the source of the bug since my input file is 2,436 bytes long, so it requires multiple buffers in Mac.

This is the sort of bug I am really good at fixing in flow programs, but I don't have time right now since I fixed it for my application and I'm busy on other things.

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

Successfully merging a pull request may close this issue.

1 participant