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

32-bit OS revealed bug #14

Open
db4 opened this issue Feb 27, 2019 · 5 comments
Open

32-bit OS revealed bug #14

db4 opened this issue Feb 27, 2019 · 5 comments
Labels
bug Something isn't working

Comments

@db4
Copy link
Contributor

db4 commented Feb 27, 2019

let%lwt stack_pos = Lwt_io.BE.read_int conn.in_chan in
if stack_pos = -1 then Lwt.return None

On 32-bit OS Lwt_io.BE.read_int reads -1 as -2 and check f stack_pos = -1 fails. See lwt sources:

https://github.com/ocsigen/lwt/blob/d791b9bd3e0ec3035796122e002d9e85408304d0/src/unix/lwt_io.ml#L1058-L1069

Using if stack_pos < 0 then Lwt.return None I was able to make it working although it's not a good fix (BTW under Windows x86, so Windows seems to be actually supported). Looks like a lwt bug?

@hackwaly
Copy link
Owner

You can file an issue to lwt

@db4
Copy link
Contributor Author

db4 commented Feb 28, 2019

You can file an issue to lwt

ocsigen/lwt#671

@db4
Copy link
Contributor Author

db4 commented Feb 28, 2019

Once it's confirmed lwt bug, can you use stack_pos < 0 instead of stack_pos = -1 as a workaround?

@hackwaly
Copy link
Owner

I changed it to stack_pos < 0. Do you need a release?

@db4
Copy link
Contributor Author

db4 commented Feb 28, 2019

It's not badly needed but if you release a new version, can you update OPAM package as well? (I prefer to install ocamlearlybird via OPAM)

@sim642 sim642 added the bug Something isn't working label Jun 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants