[gambit-list] ___setup memory corruption(?) on iPhone

mikel evins mevins at me.com
Wed Jun 6 19:59:04 EDT 2012

On Jun 6, 2012, at 5:57 PM, Kirill Zorin wrote:

> Hi all,
> I've built (a slow version of) Gambit with llvm-gcc 4.2 on Mac OS X, targeted for the iPhone, using the build-gambit-iOS script, for the iOS 5.1 SDK. (I can't build it with latest clang, because for whatever reason Gambit's configure exits with various autoconf-related errors when clang is used.)
> When I run ___setup(...) as required, from a separate thread, the function never returns. If I call it from the main thread it returns, except that after that, various Apple libraries begin to crash in mysterious ways.
> If I don't run ___setup(...) at all (from any thread), everything works fine. (Except, of course, that I can't run Scheme code =))
> Any ideas what could be at fault here (i.e. what I'm doing wrong)? For comparison, the same scenario (exactly the same code, linkage, etc.) built for Mac OS X works as required regardless of what thread ___setup() is called from initially.

For what it's worth, I saw similar problems using Gambit 4.6.1. We rolled back to a 4.6.1-based toolchain for our iOS work.

More information about the Gambit-list mailing list