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
Incomplete native backtraces on armel #6233
Comments
Comment author: meurer Same for armhf. |
Comment author: @gasche During 4.01 development there were some changes to the trace collection code. In particular:
Do you think it would be possible to test whether the regression is related to any of those two commits? I don't know how I would access an ARM myself. |
Comment author: @glondu None of these commits unapplies cleanly. I have access to armel and armhf machines, and can do tests there if I am told what to do. |
Comment author: @jhjourdan Could you give me the generated assembly code for both files ? E.g. run : And upload the file backtrace2.s |
Comment author: @glondu @jacques-henri: I've uploaded the generated (by released version 4.01.0) assembly code for armhf. |
Comment author: @jhjourdan Debug information is not present at point of array bounds checking. Could you please provide the dumps for all intermediate languages of the native chain ? That is, run : And upload all the backtrace2.* files (in a tarball, preferably). Thanks ! |
Comment author: @glondu The only generated backtrace2.* file is backtrace2.s. All the rest is on stdout/stderr. I've uploaded the output. |
Comment author: @jhjourdan Here is a tentative patch, could you test it ? diff --git a/asmcomp/linearize.ml b/asmcomp/linearize.ml +(* Cons an instruction (live empty) *)
(* Cons a simple instruction (arg, res, live empty) *) let cons_instr d n =
type fundecl =
|
Comment author: @glondu All the tests pass on armhf with the patch applied. However, this patch touches generic code and this bug affects only ARM. How come it doesn't happen on Intel architectures? |
Comment author: meurer For i386 and amd64, scheduling is a no-op. |
Comment author: @xavierleroy I ran into the same issue on PowerPC and independently came up with a similar analysis and fix. It's committed on the 4.01 bugfix branch (r14325) and on the trunk (r14323). |
Comment author: @glondu Interesting... by any chance, would it be possible to easily fix native backtraces on sparc as well? |
Comment author: @xavierleroy
We lack real Sparc hardware to properly maintain the Sparc back-end. All I have right now is a QEMU-based setup that is barely usable. If anyone can provide us with a shell account on a well-configured Sparc machine, let us know. |
Comment author: @glondu I have access to sparc machines that are restricted to Debian Developers, but I think you can ask for an account on the GCC compile farm: |
Comment author: @glondu Actually, native backtraces don't work at all on powerpc, even after r14325. |
Original bug ID: 6233
Reporter: @glondu
Status: closed (set by @xavierleroy on 2015-12-11T18:25:32Z)
Resolution: fixed
Priority: normal
Severity: minor
Platform: armel
OS: Debian
OS Version: sid
Version: 4.01.0
Fixed in version: 4.01.1+dev
Category: ~DO NOT USE (was: OCaml general)
Monitored by: @gasche meurer
Bug description
Native backtraces are incomplete on armel (armhf has not been tested yet).
The following tests fail:
tests/backtrace/backtrace2.ml
tests/backtrace/raw_backtrace.ml
Additional information
Here are the diffs between expected and actual outputs:
--- backtrace2.reference 2013-06-19 14:26:10.000000000 +0000
+++ backtrace2.native.result 2013-11-09 11:23:20.000000000 +0000
@@ -24,4 +24,3 @@
Called from file "backtrace2.ml", line 22, characters 4-11
Called from file "backtrace2.ml", line 29, characters 11-23
Uncaught exception Invalid_argument("index out of bounds")
-Raised by primitive operation at file "backtrace2.ml", line 29, characters 14-22
abel% diff -u raw_backtrace.reference raw_backtrace.native.result
--- raw_backtrace.reference 2013-06-19 14:27:10.000000000 +0000
+++ raw_backtrace.native.result 2013-11-09 11:23:21.000000000 +0000
@@ -24,4 +24,3 @@
Called from file "raw_backtrace.ml", line 22, characters 4-11
Called from file "raw_backtrace.ml", line 29, characters 11-23
Uncaught exception Invalid_argument("index out of bounds")
-Raised by primitive operation at file "raw_backtrace.ml", line 29, characters 14-22
File attachments
The text was updated successfully, but these errors were encountered: