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

[ocaml5-issue] Output to closed Out_channel fails to raise Sys_error #432

Closed
jmid opened this issue Jan 16, 2024 · 2 comments
Closed

[ocaml5-issue] Output to closed Out_channel fails to raise Sys_error #432

jmid opened this issue Jan 16, 2024 · 2 comments
Labels
ocaml5-issue A potential issue in the OCaml5 compiler/runtime

Comments

@jmid
Copy link
Collaborator

jmid commented Jan 16, 2024

The revised Out_channel STM test in #431 revealed a regression on 5.2 and trunk/5.3 where a second output call no longer raises an exception:

Messages for test STM Out_channel test sequential:

  Results incompatible with model

   Close_noerr : Ok (())
   Output_string "\177q\183z" : Error (Sys_error("Bad file descriptor"))
   Output_string "\127\165\243\019\171\015c\031\003" : Ok (())

The issue is not limited to output_string. The other output operations output_byte, output_char, ... are also affected.

This has been reported upstream in ocaml/ocaml#12898

@jmid jmid added the ocaml5-issue A potential issue in the OCaml5 compiler/runtime label Jan 16, 2024
@jmid
Copy link
Collaborator Author

jmid commented Jan 16, 2024

An output following a seek is also affected:
https://ocaml-multicoretests.ci.dev:8100/job/2024-01-12/133422-ci-ocluster-build-389bbf

Messages for test STM Out_channel test sequential:

  Results incompatible with model

   Close : Ok (())
   Seek 2L : Error (Sys_error("Bad file descriptor"))
   Output_string "Q\167\017" : Ok (())

@jmid
Copy link
Collaborator Author

jmid commented Mar 27, 2024

Closing as this has been fixed upstream in ocaml/ocaml#12678 and included in 5.2.0~beta1

@jmid jmid closed this as completed Mar 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ocaml5-issue A potential issue in the OCaml5 compiler/runtime
Projects
None yet
Development

No branches or pull requests

1 participant