[cfe-dev] Clang 'locks up' when compiling optimized
David Barto via cfe-dev
cfe-dev at lists.llvm.org
Wed Jun 28 08:10:51 PDT 2017
This is part of an in-memory system (no swap space configured) so RSS would match the AS size for this use case. From what I read about RSS and AS for MacOS and Linux.
Why did it lock up, why not throw the exception and exit?
David
> On Jun 28, 2017, at 8:07 AM, Brian Cain <brian.cain at gmail.com> wrote:
>
>
>
> On Wed, Jun 28, 2017 at 9:55 AM, David Barto <barto at cambridgesemantics.com <mailto:barto at cambridgesemantics.com>> wrote:
> This the the stack trace when the compiler locked up.
> I attached with ‘lldb -p <pid>”
> I did the thread backtrace all then a process resume
> I interrupted the program again and did a second thread backtrace all. Both were identical.
>
> David
>
> (lldb) thread backtrace all
> * thread #1: tid = 0x13b475b, 0x00007fff90ec65da libsystem_kernel.dylib`syscall_thread_switch + 10, queue = 'com.apple.main-thread', stop reason = signal SIGSTOP
> * frame #0: 0x00007fff90ec65da libsystem_kernel.dylib`syscall_thread_switch + 10
> frame #1: 0x00007fff9497682d libsystem_platform.dylib`_OSSpinLockLockSlow + 63
> frame #2: 0x00007fff8ca7271b libsystem_malloc.dylib`szone_malloc_should_clear + 116
> frame #3: 0x00007fff8ca72667 libsystem_malloc.dylib`malloc_zone_malloc + 71
> frame #4: 0x00007fff8ca71187 libsystem_malloc.dylib`malloc + 42
> frame #5: 0x00007fff991fa43e libc++.1.dylib`operator new(unsigned long) + 30
> frame #6: 0x00007fff991fcf05 libc++.1.dylib`std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::__init(char const*, unsigned long) + 59
> frame #7: 0x000000010e6fc7a9 libLLVM.dylib`llvm::sys::findProgramByName(llvm::StringRef, llvm::ArrayRef<llvm::StringRef>) + 670
>
>
> This seems to point back to your RLIMIT_AS constraint, or overall system memory availability. Why constrain the address space? A much more realistic constraint would be RLIMIT_RSS.
>
> -Brian
David Barto
barto at cambridgesemantics.com
Sometimes, my best code does nothing. Most of the rest of it has bugs.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20170628/666ab629/attachment.html>
More information about the cfe-dev
mailing list