简体   繁体   English

为什么OCaml二进制文件在Mac OS X 10.8(Mountain Lion)上崩溃?

[英]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二进制文件的启动:

  • Native compiled (as opposed to bytecode) 本机编译 (与字节码相对)
  • Run with backtraces enabled (eg via 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.

相关问题 Mac OS X 10.8 Mountain Lion的内核调试工具包 - Kernel Debug Kit for Mac OS X 10.8 Mountain Lion 在Mac OS X 10.8 Mountain Lion上未调用该方法 - Method does not invoked on Mac OS X 10.8 Mountain Lion 如何在Mac OS X 10.8(山狮)中更改Homebrew的git origin远程位置? - How do I change the git origin remote location of Homebrew in Mac OS X 10.8 (mountain lion)? 如何为Mac OS X 10.8 Mountain Lion设置Java JDK环境变量 - How to Set Java JDK Environment Variable for Mac OS X 10.8 Mountain Lion Mac OS X 10.8 Mountain Lion上安装了Oracle(Sun)的JDK / JRE在哪里? - Where is Oracle's (Sun's) JDK/JRE installed on Mac OS X 10.8 Mountain Lion? 如何在 Mac Mountain Lion OS X v10.8 上使用 pip 安装 Scipy - How to install Scipy with pip on Mac Mountain Lion OS X v10.8 如何在Mac OS X 10.8上的野生动物园中启用32位Java [Mountain Lion] - How to enable 32 bit Java in safari on Mac OS X 10.8 [Mountain Lion] 如何卸载Xcode 4.4命令行工具(Mac OS X 10.8 Mountain Lion)? - How to uninstall Xcode 4.4 command line tools (Mac OS X 10.8 Mountain Lion)? 如何在Mac OS X 10.8 Mountain Lion的非视网膜显示器上模拟视网膜显示器(HiDPI模式)? - How to simulate a retina display (HiDPI mode) in Mac OS X 10.8 Mountain Lion on a non-retina display? 为什么Jar Bundler会进入Mac OS X Mountain Lion 10.8.2 - Why is Jar Bundler gone in Mac OS X Mountain Lion 10.8.2
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM