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

Null pointer access with Fileevent.add_fileoutput #2966

Closed
vicuna opened this issue Sep 19, 2001 · 1 comment
Closed

Null pointer access with Fileevent.add_fileoutput #2966

vicuna opened this issue Sep 19, 2001 · 1 comment
Labels

Comments

@vicuna
Copy link

vicuna commented Sep 19, 2001

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

Bug description

Full_Name: Patrick Doane
Version: 3.02
OS: Windows NT 4.0
Submission from: 216.30.40.244 (216.30.40.244)

The following program crashes with an attempt to reference memory at
"0x00000000". If I remove the call to add_fileoutput, then the program does not
crash.

I have installed TCL/TK 8.3 from ftp://ftp.scriptics.com/pub/tcl/tcl8_3/ and
verified that the tcl83.lib and tk83.lib from that installation are the only
ones that exist in the LIB path.

--

open Unix

let fileinput () = prerr_endline "fileinput"
let fileoutput () = prerr_endline "fileoutput"
;;
let test host port =
let inet_addr = (gethostbyname host).h_addr_list.(0) in
let sock_addr = ADDR_INET (inet_addr, port) in
let fd = socket ~domain:PF_INET ~kind:SOCK_STREAM ~protocol:0 in
connect fd sock_addr;
Fileevent.add_fileinput ~fd ~callback:fileinput;
Fileevent.add_fileoutput ~fd ~callback:fileoutput;
;;
let main () =
let top = Tk.openTk () in
test "localhost" 5555;
Tk.mainLoop ()
;;
Unix.handle_unix_error main ()

@vicuna
Copy link
Author

vicuna commented Sep 24, 2001

Comment author: administrator

Duplicate of #2965

@vicuna vicuna closed this as completed Aug 25, 2002
@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