[lldb-dev] LLDB kernel panic on OSX

Greg Clayton gclayton at apple.com
Tue Jan 7 15:25:38 PST 2014

Try modifying the function in Host.mm:

static short GetPosixspawnFlags (ProcessLaunchInfo &launch_info)

by commenting out the following lines:

    // Close all files exception those with file actions if this is supported.
    flags |= POSIX_SPAWN_CLOEXEC_DEFAULT;       

Using this flag used to cause kernel panics. Maybe it still does on 10.7? Let me know if this fixes things and if it does, then I will place a dynamic MacOSX version check for 10.8 and above.


On Jan 7, 2014, at 4:14 AM, Andrew MacPherson <andrew.macp at gmail.com> wrote:

> Hello,
> I've tried building the latest LLDB + LLVM from trunk on two different OSX machines running Lion (10.7.5) and the resulting lldb binary seems to cause a kernel panic when run. I'm not an OSX developer normally so it's quite possible that I'm doing something wrong and I'm wondering if anyone has any pointers.
> I have tried with both clang 3.2 (the default for Xcode 4.6) as well as clang 3.3 from MacPorts with the following configure line:
> ./configure --enable-optimized --enable-assertions --enable-cxx11 --enable-libcpp
> The lldb binary can be run but crashes when trying to launch a process.
> lldb /usr/bin/python
> (lldb) r
> <kernel panic>
> Any ideas are welcome.
> Thanks,
> Andrew
> _______________________________________________
> lldb-dev mailing list
> lldb-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev

More information about the lldb-dev mailing list