-
Notifications
You must be signed in to change notification settings - Fork 177
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
Segfault on Lwt_unix.tcsetattr with bad parameters #798
Comments
Looking at the stub's code, it looks like decode_terminal_status function, called from worker_tcsetattr, throws unix_error()s on errors. I'm not familiar with LWT's internals, but this seems to clash with/bypass the |
GreenArchon
added a commit
to GHGSat/lwt
that referenced
this issue
Aug 25, 2020
GreenArchon
added a commit
to GHGSat/lwt
that referenced
this issue
Aug 31, 2020
GreenArchon
added a commit
to GHGSat/lwt
that referenced
this issue
Aug 31, 2020
(cherry picked from commit 139a168)
raphael-proust
added a commit
that referenced
this issue
Sep 1, 2020
Lwt_unix.tcsetattr: Fix segfault on bad arguments (#798)
The fix has been merged into |
pveber
pushed a commit
to pveber/lwt
that referenced
this issue
Nov 13, 2020
GreenArchon
added a commit
to GHGSat/lwt
that referenced
this issue
Dec 7, 2020
(cherry picked from commit 139a168)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello,
The following code
, accompanied by the prior creation of a pseudo terminal in the background in the same directory, eg. with
segfaults, with the following output:
Note the 115201 baudrate is not a standard baudrate (115200 is, and setting it does not crash), so there's a reason for the failure - but I would expect it to call the exception handler and continue its merry way, not a hard crash.
The equivalent standard OCaml code:
does not crash (but an exception is raised and handled by the print statement).
Am I missing something in the above code or is there a bug in the error handling of the underlying C stubs?
This was tested and reproduced on (OCaml 4.10, LWT 5.3.0), (OCaml 4.05, LWT 5.2.0), (OCaml 4.05, LWT 5.2.0 on 32-bit ARM), (Ocaml 4.05, LWT 3.2.1).
Thank you!
The text was updated successfully, but these errors were encountered: