Bug 1225995
Summary: | ppc64le: ocaml calls from ocaml to C fail with more than 8 parameters | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | Richard W.M. Jones <rjones> | ||||||||||
Component: | ocaml | Assignee: | Richard W.M. Jones <rjones> | ||||||||||
Status: | CLOSED ERRATA | QA Contact: | Václav Kadlčík <vkadlcik> | ||||||||||
Severity: | unspecified | Docs Contact: | |||||||||||
Priority: | unspecified | ||||||||||||
Version: | 7.2 | CC: | huzhan, lagarcia, normand, qe-baseos-tools-bugs, vkadlcik | ||||||||||
Target Milestone: | rc | ||||||||||||
Target Release: | --- | ||||||||||||
Hardware: | Unspecified | ||||||||||||
OS: | Unspecified | ||||||||||||
Whiteboard: | |||||||||||||
Fixed In Version: | ocaml-4.01.0-22.5.el7 | Doc Type: | Bug Fix | ||||||||||
Doc Text: | Story Points: | --- | |||||||||||
Clone Of: | Environment: | ||||||||||||
Last Closed: | 2015-11-19 04:49:42 UTC | Type: | Bug | ||||||||||
Regression: | --- | Mount Type: | --- | ||||||||||
Documentation: | --- | CRM: | |||||||||||
Verified Versions: | Category: | --- | |||||||||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||||||
Cloudforms Team: | --- | Target Upstream Version: | |||||||||||
Embargoed: | |||||||||||||
Bug Depends On: | |||||||||||||
Bug Blocks: | 1224675, 1224676 | ||||||||||||
Attachments: |
|
Description
Richard W.M. Jones
2015-05-28 17:07:01 UTC
Created attachment 1031348 [details]
call.ml
Created attachment 1031349 [details]
print.c
Created attachment 1031350 [details]
Makefile
On x86-64 the output is as expected: $ ./test -1 -1 -2 -1 -2 -3 -1 -2 -3 -4 -1 -2 -3 -4 -5 -1 -2 -3 -4 -5 -6 -1 -2 -3 -4 -5 -6 -7 -1 -2 -3 -4 -5 -6 -7 -8 -1 -2 -3 -4 -5 -6 -7 -8 -9 -1 -2 -3 -4 -5 -6 -7 -8 -9 -10 The bug does NOT occur on ppc64 big endian (I tested ocaml-4.01.0-22.2.el7.ppc64). Created attachment 1031359 [details]
Makefile
Improved Makefile - adds a 'make clean' rule and enables -g option.
Stack trace for a call with 10 parameters: #0 args10 (i1v=268699820, i2v=268699844, i3v=268699868, i4v=268699892, i5v=268699916, i6v=268699940, i7v=268699964, i8v=268699988, i9v=70368744172768, i10v=70367536164736) at print.c:179 #1 0x000000001001c734 in caml_c_call () #2 0x0000000010002b0c in camlCall__entry () #3 0x00000000100022f0 in caml_program () #4 0x000000001001c8b8 in caml_start_program () #5 0x000000001001cff8 in caml_main () #6 0x000000001000209c in main () Fix is: diff --git a/asmcomp/power64le/proc.ml b/asmcomp/power64le/proc.ml index 9b98577..30d4cdc 100644 --- a/asmcomp/power64le/proc.ml +++ b/asmcomp/power64le/proc.ml @@ -188,7 +188,7 @@ let poweropen_external_conventions first_int last_int let loc_external_arguments = match Config.system with | "rhapsody" -> poweropen_external_conventions 0 7 100 112 - | "elf" | "bsd" -> calling_conventions 0 7 100 107 outgoing 48 + | "elf" | "bsd" -> calling_conventions 0 7 100 107 outgoing 32 | _ -> assert false let extcall_use_push = false Could I have QA ack on this bug please. Reproduced this bug with ocaml-4.01.0-22.4.ael7b.ppc64le kernel-3.10.0-244.ael7b.ppc64le Reproduce step: 1. get the attachments. 2. # make # ./test -1 -1 -2 -1 -2 -3 -1 -2 -3 -4 -1 -2 -3 -4 -5 -1 -2 -3 -4 -5 -6 -1 -2 -3 -4 -5 -6 -7 -1 -2 -3 -4 -5 -6 -7 -8 -1 -2 -3 -4 -5 -6 -7 -8 0 -1 -2 -3 -4 -5 -6 -7 -8 0 70366973604056 Test case looks good, thanks. Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://rhn.redhat.com/errata/RHBA-2015-2185.html |