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

Socket bug #2892

Closed
vicuna opened this issue Aug 6, 2001 · 2 comments
Closed

Socket bug #2892

vicuna opened this issue Aug 6, 2001 · 2 comments
Labels

Comments

@vicuna
Copy link

vicuna commented Aug 6, 2001

Original bug ID: 472
Reporter: administrator
Status: closed
Resolution: fixed
Priority: normal
Severity: minor
Category: ~DO NOT USE (was: OCaml general)

Bug description

Full_Name: Ohad Rodeh
Version: 3.02
OS: WIN2000
Submission from: sungold1.il.ibm.com (192.116.181.41)

The following program fails:

open Printf
open Unix

let _ =
let local_addr = ADDR_INET (inet_addr_any, 0) in
let sock = socket PF_INET SOCK_DGRAM 0 in
setsockopt sock SO_REUSEADDR true;
()

Furthermore, I think there is a bug in win32unix/sockopt.c.
The socket conversion should be performed using:
(SOCKET)Handle_val(v)
not:
Inv_val

@vicuna
Copy link
Author

vicuna commented Aug 8, 2001

Comment author: administrator

The following program fails:

let _ =
let local_addr = ADDR_INET (inet_addr_any, 0) in
let sock = socket PF_INET SOCK_DGRAM 0 in
setsockopt sock SO_REUSEADDR true;
()
Furthermore, I think there is a bug in win32unix/sockopt.c.
The socket conversion should be performed using:
(SOCKET)Handle_val(v)
not:
Int_val

Yes, that's the cause of the failure. Untested cut-and-paste from the
modified Unix sources strikes again. (Blush.) This is fixed in the
working sources, but still rather unfortunate. Thanks for the quick
bug report.

Best regards,

  • Xavier Leroy

@vicuna
Copy link
Author

vicuna commented Aug 8, 2001

Comment author: administrator

Fixed 2001-08-08 by XL.

@vicuna vicuna closed this as completed Aug 8, 2001
@vicuna vicuna mentioned this issue Mar 14, 2019
@vicuna vicuna added the bug label Mar 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant