ocamlearlybird icon indicating copy to clipboard operation
ocamlearlybird copied to clipboard

32-bit OS revealed bug

Open db4 opened this issue 6 years ago • 5 comments

https://github.com/hackwaly/ocamlearlybird/blob/1780298f06fc814b52ad3cc550d599e64014defe/ocaml_debug_adapter/debug_conn.ml#L145-L146

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?

db4 avatar Feb 27 '19 15:02 db4

You can file an issue to lwt

hackwaly avatar Feb 27 '19 15:02 hackwaly

You can file an issue to lwt

https://github.com/ocsigen/lwt/issues/671

db4 avatar Feb 28 '19 04:02 db4

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

db4 avatar Feb 28 '19 06:02 db4

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

hackwaly avatar Feb 28 '19 06:02 hackwaly

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)

db4 avatar Feb 28 '19 07:02 db4