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: 6490 Reporter: Richard Jones Assigned to:@mshinwell Status: closed (set by @xavierleroy on 2016-12-07T10:49:14Z) Resolution: fixed Priority: normal Severity: minor Version: 4.02.0+beta1 / +rc1 Target version: 4.02.2+dev / +rc1 Fixed in version: 4.02.2+dev / +rc1 Category: back end (clambda to assembly)
Bug description
I ran ocamlopt.opt (compiled with -g) under gdb and placed a breakpoint in a random OCaml function. As you can see the stack trace is wrong after the first frame:
(gdb) break camlBtype__save_desc_1660
Breakpoint 5 at 0x4b2f34: file typing/btype.ml, line 402.
(gdb) cont
Continuing.
Breakpoint 5, 0x00000000004b2f34 in camlBtype__save_desc_1660 ()
at typing/btype.ml:402
402 let save_desc ty desc =
(gdb) bt
#0 0x00000000004b2f34 in camlBtype__save_desc_1660 () at typing/btype.ml:402 #1 0x00000000004b98e8 in camlSubst__typexp_1250 () at typing/subst.ml:116 #2 0x00000000004b98e8 in camlSubst__typexp_1250 () at typing/subst.ml:116 #3 0x00000000004b98e8 in camlSubst__typexp_1250 () at typing/subst.ml:116 #4 0x00000000004b98e8 in camlSubst__typexp_1250 () at typing/subst.ml:116 #5 0x00000000004b98e8 in camlSubst__typexp_1250 () at typing/subst.ml:116 #6 0x00000000004b98e8 in camlSubst__typexp_1250 () at typing/subst.ml:116 #7 0x00000000004b98e8 in camlSubst__typexp_1250 () at typing/subst.ml:116 #8 0x00000000004b98e8 in camlSubst__typexp_1250 () at typing/subst.ml:116 #9 0x00000000004b98e8 in camlSubst__typexp_1250 () at typing/subst.ml:116
[continues forever]
Steps to reproduce
Compile ocamlopt.opt with debugging enabled. This also applies to any OCaml program.
Place a breakpoint anywhere and run it.
Use gdb `bt' command to display the stack trace.
Stack traces are normal for C code, but consist of a repeated function for OCaml code.
The text was updated successfully, but these errors were encountered:
It turns out that the same problem could be seen on 32-bit ARM platforms.
I've committed a fix to the 4.02 branch that I tested on a 32-bit ARM machine. I have also made a fix to the AArch64 backend that I think will solve the problem, but we should test on real hardware. I will ask the OP to check, and re-open this issue if needs be.
Original bug ID: 6490
Reporter: Richard Jones
Assigned to: @mshinwell
Status: closed (set by @xavierleroy on 2016-12-07T10:49:14Z)
Resolution: fixed
Priority: normal
Severity: minor
Version: 4.02.0+beta1 / +rc1
Target version: 4.02.2+dev / +rc1
Fixed in version: 4.02.2+dev / +rc1
Category: back end (clambda to assembly)
Bug description
I ran ocamlopt.opt (compiled with -g) under gdb and placed a breakpoint in a random OCaml function. As you can see the stack trace is wrong after the first frame:
(gdb) break camlBtype__save_desc_1660
Breakpoint 5 at 0x4b2f34: file typing/btype.ml, line 402.
(gdb) cont
Continuing.
Breakpoint 5, 0x00000000004b2f34 in camlBtype__save_desc_1660 ()
at typing/btype.ml:402
402 let save_desc ty desc =
(gdb) bt
#0 0x00000000004b2f34 in camlBtype__save_desc_1660 () at typing/btype.ml:402
#1 0x00000000004b98e8 in camlSubst__typexp_1250 () at typing/subst.ml:116
#2 0x00000000004b98e8 in camlSubst__typexp_1250 () at typing/subst.ml:116
#3 0x00000000004b98e8 in camlSubst__typexp_1250 () at typing/subst.ml:116
#4 0x00000000004b98e8 in camlSubst__typexp_1250 () at typing/subst.ml:116
#5 0x00000000004b98e8 in camlSubst__typexp_1250 () at typing/subst.ml:116
#6 0x00000000004b98e8 in camlSubst__typexp_1250 () at typing/subst.ml:116
#7 0x00000000004b98e8 in camlSubst__typexp_1250 () at typing/subst.ml:116
#8 0x00000000004b98e8 in camlSubst__typexp_1250 () at typing/subst.ml:116
#9 0x00000000004b98e8 in camlSubst__typexp_1250 () at typing/subst.ml:116
[continues forever]
Steps to reproduce
Compile ocamlopt.opt with debugging enabled. This also applies to any OCaml program.
Place a breakpoint anywhere and run it.
Use gdb `bt' command to display the stack trace.
Stack traces are normal for C code, but consist of a repeated function for OCaml code.
The text was updated successfully, but these errors were encountered: