Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

native binaries crash in top-level exception handler #5700

Closed
@vicuna

Description

Original bug ID: 5700
Reporter: @avsm
Status: closed (set by @xavierleroy on 2015年12月11日T18:25:33Z)
Resolution: fixed
Priority: high
Severity: crash
OS: MacOS X
OS Version: 10.8
Version: 4.00.0+beta2/+rc1
Target version: 4.00.1+dev
Fixed in version: 4.00.1+dev
Category: back end (clambda to assembly)
Monitored by: serp @ygrek "Richard Jones" @dbuenzli

Bug description

With MacOS X 10.8 and latest XCode, native code binaries seem to crash if invoked from a subshell, with OCAMLRUNPARAM set to b.

gdb ocamlbuild
GNU gdb 6.3.50-20050815 (Apple version gdb-1820) (Sat Jun 16 02:40:11 UTC 2012)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "x86_64-apple-darwin"...Reading symbols for shared libraries .. done

(gdb) run -clean
Starting program: /Users/avsm/.opam/4.00.0+rc1/bin/ocamlbuild -clean
Reading symbols for shared libraries +............................. done

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: 13 at address: 0x0000000000000000
0x00007fff89012f88 in large_malloc ()
(gdb) bt
#0 0x00007fff89012f88 in large_malloc ()
#1 0x00007fff8901974f in szone_malloc_should_clear ()
#2 0x00007fff8900b183 in malloc_zone_malloc ()
#3 0x00007fff8900bbd7 in malloc ()
#4 0x000000010007b7d4 in caml_stat_alloc ()
#5 0x0000000100077ed5 in caml_init_frame_descriptors ()
#6 0x000000010008db66 in caml_stash_backtrace ()
#7 0x000000010008e01d in caml_raise_exn ()
Previous frame inner to this frame (gdb could not unwind past this frame)
(gdb) The program is running. Exit anyway? (y or n) y

Steps to reproduce

I can reproduce this reliably by:

$ git clone http://github.com/mirage/ocaml-cstruct
$ cd ocaml-cstruct/unix
$ make (or make clean for a simpler example).

It doesnt seem to happen directly from a shell, nor with a trivial Makefile that invokes ocamlbuild -clean directly. Narrowing it down now...

File attachments

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      AltStyle によって変換されたページ (->オリジナル) /