[英]Why do OCaml binaries crash on Mac OS X 10.8 (Mountain Lion)?
OCaml programs which worked perfectly on Lion fail on Mountain Lion, segfaulting on startup in OCaml runtime code: 适用于Lion的OCaml程序在Mountain Lion上失败,在OCaml运行时代码启动时出现分段:
Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: 13 at address: 0x0000000000000000
0x00007fff908e1f88 in large_malloc ()
There appears to be a widespread problem with the native-compiled ( ocamlopt
) OCaml runtime when backtraces are enabled which is new to Mountain Lion. 当启用回溯时,本机编译(
ocamlopt
)OCaml运行时似乎存在普遍问题,这是Mountain Lion的新功能。 This same crash affects the startup of any OCaml binaries which are: 同样的崩溃会影响任何 OCaml二进制文件的启动:
OCAMLRUNPARAM=b
) OCAMLRUNPARAM=b
) This even includes parts of the OCaml compiler toolchain, itself, which will suddenly stop working after an upgrade to 10.8. 这甚至包括OCaml编译器工具链的一部分,它本身在升级到10.8后会突然停止工作。
This still affects the OCaml SVN trunk (4.01.dev) as of 2012-07-19 . 这仍然影响到2012-07-19的OCaml SVN中继线(4.01.dev)。
The workaround is to disabled backtraces when working with native compiled binaries (unset OCAMLRUNPARAM
, or remove b
from your parameter string). 解决方法是在使用本机编译的二进制文件时禁用回溯(取消设置
OCAMLRUNPARAM
,或从参数字符串中删除b
)。
update : 更新 :
The underlying bug appears to be due to insufficient stack alignment in the OCaml runtime implementation. 底层错误似乎是由于OCaml运行时实现中的堆栈对齐不足。 Since the originally post, this is now being tracked and fixed on the OCaml bug tracker .
从最初的帖子开始,现在正在OCaml bug跟踪器上跟踪和修复它 。 For now, however, the workaround remains the only simple choice.
但是,目前,解决方法仍然是唯一的简单选择。
这个问题可以得到解决,有一个解释,一个补丁这里 OCaml中的错误追踪系统。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.