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

x86_32 native code crash (includes trivial example) #4235

Closed
vicuna opened this issue Mar 20, 2007 · 2 comments
Closed

x86_32 native code crash (includes trivial example) #4235

vicuna opened this issue Mar 20, 2007 · 2 comments

Comments

@vicuna
Copy link

vicuna commented Mar 20, 2007

Original bug ID: 4235
Reporter: djs55
Status: closed (set by @xavierleroy on 2007-05-12T09:24:26Z)
Resolution: fixed
Priority: normal
Severity: crash
Version: 3.09.3
Category: back end (clambda to assembly)
Monitored by: ertai

Bug description

Attached is a small non-recursive program which segfaults when compiled to native code and executed. Program works fine in bytecode, on other architectures and with other ocaml compiler versions. (In particular it doesn't crash on 3.10beta so maybe this is a known fixed bug)

Here's what I get (under CentOS 4.4, ocaml 3.09.3):

$ make
make[1]: Entering directory /bad' ocamlopt -o crash crash.ml File "crash.ml", line 3, characters 6-7: Warning Y: unused variable g. make[1]: Leaving directory /bad'

$ ./crash
Segmentation fault (core dumped)

$ gdb ./crash
GNU gdb Red Hat Linux (6.3.0.0-1.132.EL4rh)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i386-redhat-linux-gnu"...(no debugging symbols found)
Using host libthread_db library "/lib/tls/i686/libthread_db.so.1".

(gdb) run
Starting program: /bad/crash
Reading symbols from shared object read from target memory...(no debugging symbols found)...done.
Loaded system supplied DSO at 0xffffe000
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)

Program received signal SIGSEGV, Segmentation fault.
0x0804aa10 in camlPervasives__failwith_37 ()
(gdb) bt
#0 0x0804aa10 in camlPervasives__failwith_37 ()
Cannot access memory at address 0x1
(gdb)

Additional information

Configuration of machine (actually a chroot) where crash is easily reproduced:

Program works fine on:

  • same configuration as above but with ocaml 3.10beta

Program works fine on:

Program works fine on:

  • ocaml 3.09.3
  • Mac OS X 10.4 (PowerPC G4)

File attachments

@vicuna
Copy link
Author

vicuna commented Mar 20, 2007

Comment author: ertai

According tests done on my machine this problem is already fixed in the CVS for the 3.10 release (I also confirm that on the same machine it fails with 3.09.3).

@vicuna
Copy link
Author

vicuna commented May 12, 2007

Comment author: @xavierleroy

This is a known problem with 3.09.3 on x86. It's fixed in the 3.10 branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant