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

threads.cmxa => no Stack_overflow #3046

Closed
vicuna opened this issue Aug 7, 2004 · 2 comments
Closed

threads.cmxa => no Stack_overflow #3046

vicuna opened this issue Aug 7, 2004 · 2 comments
Labels

Comments

@vicuna
Copy link

vicuna commented Aug 7, 2004

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

Bug description

Full_Name: Martin Jambon
Version: 3.08.0
OS: Linux Debian Woody i386
Submission from: 218.81.128.189 (218.81.128.189)

This program does not raise Stack_overflow or any exception when linked against
threads.cmxa, but instead starts an infinite loop that does nothing except using
the CPU (88% system, 12% user).

When compiled to native code without threads.cmxa or to bytecode, some Stack
Overflow error terminates the process, which is the expected behavior.

(* ocamlopt -o tst -thread threads.cmxa test.ml; ./tst > log *)

let rec loop () =
try print_string "x"; print_newline (); loop ()
with Exit -> ()

let _ =
loop ()

@vicuna
Copy link
Author

vicuna commented Aug 9, 2004

Comment author: administrator

This program does not raise Stack_overflow or any exception when
linked against threads.cmxa, but instead starts an infinite loop
that does nothing except using the CPU (88% system, 12% user).

I can reproduce this behavior on Debian Woody, but not on RedHat 7.3
(where Stack_overflow is correctly raised). A similar test written
entirely in C works under RH but causes a "double segfault" in a
libpthread function under Debian. So, this is a bug / limitation in
the version of libpthread used in Debian Woody. The Caml runtime code
is correct.

  • Xavier Leroy

@vicuna
Copy link
Author

vicuna commented Aug 9, 2004

Comment author: administrator

Crash in pthread_sighandler reproducible under Debian woody but not under RedHat
7.3.
Bug/limitation in some versions of libpthread. Not a Caml bug.

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