You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Original bug ID: 395 Reporter: administrator Status: closed Resolution: fixed Priority: normal Severity: minor Category: ~DO NOT USE (was: OCaml general)
Problem: When compiled with ocamlopt, signal handlers receive a bad
signal-number argument. The problem does not occur when the same
code is compiled with ocamlc.
Probable cause: in asmrun/signals.c, in execute_signal, the Unix signal
number is not converted back to an Ocaml signal number. In
byterun/signals.c, a reverse conversion takes place that is
absent in asmrun/signals.c.
Example:
open Printf
open Unix
let do_tick signum =
if signum <> Sys.sigalrm then begin
eprintf "BUG: signum = %d, sigalrm = %d\n" signum Sys.sigalrm;
exit 8
end
let main () =
Sys.set_signal Sys.sigalrm (Sys.Signal_handle do_tick);
while true do
prerr_endline "hi";
kill (getpid ()) Sys.sigalrm
done
;;
main ()
The text was updated successfully, but these errors were encountered:
Problem: When compiled with ocamlopt, signal handlers receive a bad
signal-number argument. The problem does not occur when the same
code is compiled with ocamlc.
Probable cause: in asmrun/signals.c, in execute_signal, the Unix signal
number is not converted back to an Ocaml signal number. In
byterun/signals.c, a reverse conversion takes place that is
absent in asmrun/signals.c.
Correct. This issue (and another signal-related bug) was fixed in the
bytecode runtime, but not in the asm runtime. This is now fixed in
the working sources. Thanks for reporting it.
Original bug ID: 395
Reporter: administrator
Status: closed
Resolution: fixed
Priority: normal
Severity: minor
Category: ~DO NOT USE (was: OCaml general)
Bug description
Full_Name: Raoul Bhoedjang
Version: ocaml 3.01
OS: linux 2.4.2-2
Submission from: syr-66-24-49-102.twcny.rr.com (66.24.49.102)
Problem: When compiled with ocamlopt, signal handlers receive a bad
signal-number argument. The problem does not occur when the same
code is compiled with ocamlc.
Probable cause: in asmrun/signals.c, in execute_signal, the Unix signal
number is not converted back to an Ocaml signal number. In
byterun/signals.c, a reverse conversion takes place that is
absent in asmrun/signals.c.
Example:
open Printf
open Unix
let do_tick signum =
if signum <> Sys.sigalrm then begin
eprintf "BUG: signum = %d, sigalrm = %d\n" signum Sys.sigalrm;
exit 8
end
let main () =
Sys.set_signal Sys.sigalrm (Sys.Signal_handle do_tick);
while true do
prerr_endline "hi";
kill (getpid ()) Sys.sigalrm
done
;;
main ()
The text was updated successfully, but these errors were encountered: