Fix a crash in IPCPathManagerBatchTest on Windows.
This CL addresses a silent crash in IPCPathManagerBatchTest on Windows.
Suppose 1MB memory range needs to be reserved for a thread by default.
If we want to run 8,192 threads at the same time, we need at least 8GB
memory range, which is, of course, impossible since ipc_test.exe is a
32-bit executable on Windows.
This issue was not discovered probably because GTest's exception
handlers silently drain runtime exceptions.
With this CL, the number of threads will be decreased from 8192 to 64.
This is an issue in a unit test. Production binaries have nothing to do
with this crash.
BUG=
TEST=unittest
REF_BUG
REF_CL=105721236
Yohei Yukawa
8 years ago
120 | 120 | TEST_F(IPCPathManagerTest, IPCPathManagerBatchTest) { |
121 | 121 | // mozc::Thread is not designed as value-semantics. |
122 | 122 | // So here we use pointers to maintain these instances. |
123 | vector<BatchGetPathNameThread *> threads(8192); | |
123 | vector<BatchGetPathNameThread *> threads(64); | |
124 | 124 | for (size_t i = 0; i < threads.size(); ++i) { |
125 | 125 | threads[i] = new BatchGetPathNameThread; |
126 | 126 | threads[i]->Start(); |