Why is malloc not coming back?

I have a thread (OS X 10.10.5) that hangs with this stack trace. Its about 20 hours of work is probably due to low memory. But, the question is, why does malloc just return null? Why is thread execution necessary to stop? The actual number of bytes requested is small (for a string operation along the path).

std::wstring finalPath = itsPath.substr(0,ls+1);

  1   operator new(unsigned long) + 37 (libc++abi.dylib + 124485) [0xa0339645] 2
   1   malloc + 29 (libsystem_malloc.dylib + 3997) [0xa1829f9d] 2
    1   malloc_zone_malloc + 116 (libsystem_malloc.dylib + 7243) [0xa182ac4b] 2
     1   default_zone_malloc + 3 (libsystem_malloc.dylib + 67909) [0xa1839945] 2
     *1   thread_exception_return + 0 (kernel + 632362) [0xffffff800029a62a] (runnable) 2

The purpose of the failed operation is to clear the temporary directory so that the boot disk does not fill in the temporary files generated by the program. This process fails, the disk really fills up, the thread stops (as it really does, and the main thread joins it), and the process of deleting files from the disk stops. In addition, the process must be killed because the thread is stopped. I do not know whether this can be called a mistake, since a failed process is an attempt to prevent what is actually happening.

Thank you for your understanding.

+4
source share
1 answer

, , , , . macOS , . , / , , , kill -CONT <PID>.

, , .

0

Source: https://habr.com/ru/post/1676773/


All Articles