You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What steps will reproduce the problem?
Call heap-profiler_unittest with the arguments 1 -2 (one iteration, 2 fork()ed children).
What is the expected output? What do you see instead?
Instead of running the test, the program crashes with a std::bad_alloc exception.
This is caused by unconditionally passing the number-of-threads-argument (0 or positive
for threads, negative for fork()s) in RunManyThreads(), thus allocating an array of
pthread_t of size -2.
Depending on the sign of the thread number argument either RunManyThreads or fork()
should be called.
What version of the product are you using? On what operating system?
Git HEAD, Ubuntu 13.04, 3.8.0-19-generic
Please provide any additional information below.
Patch attached.
Best regards,
Hannes Weisbach
Reported by hannes.weisbach on 2013-11-12 11:43:40
Originally reported on Google Code with ID 588
Reported by
hannes.weisbach
on 2013-11-12 11:43:40- _Attachment: [gperftools-profiler-fork.patch](https://storage.googleapis.com/google-code-attachments/gperftools/issue-588/comment-0/gperftools-profiler-fork.patch)_
The text was updated successfully, but these errors were encountered: