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: 7326 Reporter: cspiel Assigned to:@mshinwell Status: closed (set by @xavierleroy on 2017-09-24T15:33:21Z) Resolution: fixed Priority: normal Severity: crash OS: GNU/Linux Fixed in version: 4.04.0 +dev / +beta1 / +beta2 Category: back end (clambda to assembly)
Bug description
Ocamlopt (4.05.0+dev0-2016-08-01) with the Spacetime extension writes
a comment to the assembler file in the form
/* Shape for PARTIALLY_MANGLED_FUNCTION_NAME */
where PARTIALLY_MANGLED_FUNCTION_NAME is derived from the function
name. If the function name happens to contain the end-of-comment
character sequence of the assembler, the assembler barfs.
For the example given in `Steps To Reproduce' the offending line is
/* Shape for camlTimes_slash__*/_4: */
Steps to reproduce
Compile the following two-liner with a Spacetime-enabled native compiler.
type t = {x: float}
let ( */ ) a v = {x = a *. v.x}
Additional information
Three possible fixes immediately come into my mind.
They all concern file "asmcomp/amd64/emit.mlp".
(1) Make the assembler comment in function emit_spacetime_shapes' a literal, e.g. D.comment "Start of Spacetime shapes." The bracketing end-of-shapes comment already is such a constant. (2) Consider the attached patch of emit_spacetime_shapes'. It applies the
same mangling to the function name inside the comment as is applied
to the function's assembler label.
(3) Spice up function `comment' to escape all character sequences that are
indigestible to the assembler.
Original bug ID: 7326
Reporter: cspiel
Assigned to: @mshinwell
Status: closed (set by @xavierleroy on 2017-09-24T15:33:21Z)
Resolution: fixed
Priority: normal
Severity: crash
OS: GNU/Linux
Fixed in version: 4.04.0 +dev / +beta1 / +beta2
Category: back end (clambda to assembly)
Bug description
Ocamlopt (4.05.0+dev0-2016-08-01) with the Spacetime extension writes
a comment to the assembler file in the form
/* Shape for PARTIALLY_MANGLED_FUNCTION_NAME */
where PARTIALLY_MANGLED_FUNCTION_NAME is derived from the function
name. If the function name happens to contain the end-of-comment
character sequence of the assembler, the assembler barfs.
For the example given in `Steps To Reproduce' the offending line is
/* Shape for camlTimes_slash__*/_4: */
Steps to reproduce
Compile the following two-liner with a Spacetime-enabled native compiler.
type t = {x: float}
let ( */ ) a v = {x = a *. v.x}
Additional information
Three possible fixes immediately come into my mind.
They all concern file "asmcomp/amd64/emit.mlp".
(1) Make the assembler comment in function
emit_spacetime_shapes' a literal, e.g. D.comment "Start of Spacetime shapes." The bracketing end-of-shapes comment already is such a constant. (2) Consider the attached patch of
emit_spacetime_shapes'. It applies thesame mangling to the function name inside the comment as is applied
to the function's assembler label.
(3) Spice up function `comment' to escape all character sequences that are
indigestible to the assembler.
File attachments
The text was updated successfully, but these errors were encountered: