Browse thread
Re: [Caml-list] Segfault using malloc within stubs
- Garry Belka
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: | 2005-02-25 (00:37) |
From: | Garry Belka <garry@N...> |
Subject: | Re: [Caml-list] Segfault using malloc within stubs |
In our case the problem was in an interaction of interface definition and run-time system, so to say. The memory we were allocating within stub was described as an Ocaml string, and so Ocaml was trying to check its size at first access, and failing with segfault. As soon as we defined access functions for the string based on unsafe_get instead of naively using x.(i) notation, we stopped seeing Segfault. Other option it to compile code with -unsafe turned on. Garry