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
Ocamlopt generates segfaulting binary #5474
Comments
Comment author: @ygrek cannot reproduce |
Comment author: dlovasko works(reproducing) for me: ocaml-3.12.0-11.1.2.x86_64 are you running the executable attached, or have you compiled one yourself? |
Comment author: @ygrek There is nothing attached. Where did you get ocaml from - self-compiled or from suse package? In the latter case - you'd better first discuss this issue with suse packagers. |
Comment author: dlovasko somehow the upload does not work for me, so i uploaded the binary here, please try it: |
Comment author: @glondu Indeed, the executable provided segfaults in a virtual machine running Debian stable. But I cannot reproduce it by recompiling from sources (but I tried only 3.12.1). I guess something is wrong with your toolchain. strace output:
ltrace output:
It looks like something is wrong in the initialization of the OCaml runtime. Did you try recompiling OCaml yourself, then use it to generate foo? |
Comment author: @glondu Oh, and the backtrace (with gdb):
|
Comment author: @glondu I couldn't reproduce your segfaulting executable, even with an openSUSE 12.1 live CD and the same version of ocaml and glibc. The version of binutils is 2.21.1-12.1.4. |
Original bug ID: 5474
Reporter: dlovasko
Status: closed (set by @xavierleroy on 2012-09-25T18:10:24Z)
Resolution: unable to duplicate
Priority: normal
Severity: crash
Platform: x86_64
OS: Linux x86_64
OS Version: openSUSE 11.4
Version: 3.12.0
Category: -for ocamlbuild use https://github.com/ocaml/ocamlbuild/issues
Monitored by: @protz mehdi @glondu
Bug description
source code:
let _ = Printf.printf "hello\n"
compilation:
ocamlopt -o foo ocaml.segfault.ml
result:
see attachment
after running the executable, error pops out:
Program received signal SIGSEGV, Segmentation fault.
0x000000000062ee00 in strcpy@@GLIBC_2.2.5 ()
the same code, but in ocaml interpreter works
glibc version: "2.11.3-12.15.1"
Steps to reproduce
Run the attachment
The text was updated successfully, but these errors were encountered: