| Anonymous | Login | Signup for a new account | 2015-08-05 20:29 CEST | ![]() |
| Main | My View | View Issues | Change Log | Roadmap |
| View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
| ID | Project | Category | View Status | Date Submitted | Last Update | |||
| 0005237 | OCaml | OCaml general | public | 2011-03-07 23:25 | 2012-09-25 20:06 | |||
| Reporter | ecc | |||||||
| Assigned To | xleroy | |||||||
| Priority | normal | Severity | major | Reproducibility | always | |||
| Status | closed | Resolution | fixed | |||||
| Platform | OS | OS Version | ||||||
| Product Version | 3.12.0 | |||||||
| Target Version | Fixed in Version | 3.12.1+dev | ||||||
| Summary | 0005237: ocamlopt for amd64 fails with binutils 2.21 | |||||||
| Description | $ cat bug.ml let f x = x *. 1.0 $ as --version # version currently in Debian "sid" GNU assembler (GNU Binutils for Debian) 2.21.0.20110302 $ ocamlopt bug.ml /tmp/camlasmd5071c.s: Assembler messages: /tmp/camlasmd5071c.s:74: Error: .size expression does not evaluate to a constant File "bug.ml", line 1, characters 0-1: Error: Assembler error, input left in file /tmp/camlasmd5071c.s | |||||||
| Additional Information | The same assembly file is produced by ocamlopt 3.11.2 and 3.12.0. With this version of binutils: GNU assembler (GNU Binutils for Debian) 2.20.1-system.20100303 (from Debian "squeeze") it assembles OK. The problematic line seems to be the following: .section .rodata.cst8,"a",@progbits | |||||||
| Tags | No tags attached. | |||||||
| Attached Files | ||||||||
Notes |
|
|
(0005841) ecc (reporter) 2011-03-08 04:59 |
The attached patch seems to fix the issue by reordering the .section directive. Almost the entire test suite passes. (The one failure was stack overflow detection in native code -- the overflow is detected, but the stack size is evidently different than was used for the reference output.) |
|
(0005842) spiralvoice (reporter) 2011-03-08 20:59 |
A similar problems happens when compiling Ocaml 3.12.0 on Debian sid x86 ../boot/ocamlrun ../ocamlopt -warn-error A -nostdlib -g `./Compflags random.cmx` -c random.ml /tmp/camlasm09faba.s: Assembler messages: /tmp/camlasm09faba.s:2064: Error: .size expression does not evaluate to a constant File "random.ml", line 1, characters 0-1: Error: Assembler error, input left in file /tmp/camlasm09faba.s |
|
(0005843) spiralvoice (reporter) 2011-03-08 21:00 |
The attached patch fixed the problem here |
|
(0005844) glondu (reporter) 2011-03-08 21:34 |
There are also sparc and powerpc as native architectures on Debian... but they don't seem to be affected by this bug (I've checked on sparc, powerpc looks similar). I've opened a Debian bug to keep track of this issue: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=617404 [^] |
|
(0005845) int-e (reporter) 2011-03-09 15:55 |
Note that you need a very recent binutils release to reproduce this error: 2.21.0.20110216 (Debian sid) did not have this check. |
|
(0005846) glondu (reporter) 2011-03-09 20:03 |
Note that spiralvoice's patch is incorrect. Attached is the patch (merging Eric and spiralvoice's ones) as applied in Debian. |
|
(0005847) xleroy (administrator) 2011-03-13 14:37 |
S. Glondu's patch is correct. Applied in 3.12 bugfix branch and in trunk. Will be part of release 3.12.1. |
Issue History |
|||
| Date Modified | Username | Field | Change |
| 2011-03-07 23:25 | ecc | New Issue | |
| 2011-03-08 04:52 | ecc | File Added: 0001-fix-assembly-failure-with-binutils-2.21.patch | |
| 2011-03-08 04:59 | ecc | Note Added: 0005841 | |
| 2011-03-08 20:59 | spiralvoice | Note Added: 0005842 | |
| 2011-03-08 21:00 | spiralvoice | File Added: fix_ocaml3120.diff | |
| 2011-03-08 21:00 | spiralvoice | Note Added: 0005843 | |
| 2011-03-08 21:34 | glondu | Note Added: 0005844 | |
| 2011-03-09 15:55 | int-e | Note Added: 0005845 | |
| 2011-03-09 20:04 | glondu | Note Added: 0005846 | |
| 2011-03-09 20:05 | glondu | File Added: 0007-Fix-ocamlopt-w.r.t.-binutils-2.21.patch | |
| 2011-03-13 14:37 | xleroy | Note Added: 0005847 | |
| 2011-03-13 14:37 | xleroy | Assigned To | => xleroy |
| 2011-03-13 14:37 | xleroy | Status | new => resolved |
| 2011-03-13 14:37 | xleroy | Resolution | open => fixed |
| 2011-03-13 14:37 | xleroy | Fixed in Version | => 3.12.1+dev |
| 2012-09-25 20:06 | xleroy | Status | resolved => closed |
| Copyright © 2000 - 2011 MantisBT Group |