Skip to content

Commit

Permalink
Fix a crash in IPCPathManagerBatchTest on Windows.
Browse files Browse the repository at this point in the history
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
  • Loading branch information
yukawa committed Jan 10, 2016
1 parent 261b463 commit 26eec8d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/ipc/ipc_path_manager_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ TEST_F(IPCPathManagerTest, IPCPathManagerTest) {
TEST_F(IPCPathManagerTest, IPCPathManagerBatchTest) {
// mozc::Thread is not designed as value-semantics.
// So here we use pointers to maintain these instances.
vector<BatchGetPathNameThread *> threads(8192);
vector<BatchGetPathNameThread *> threads(64);
for (size_t i = 0; i < threads.size(); ++i) {
threads[i] = new BatchGetPathNameThread;
threads[i]->Start();
Expand Down
2 changes: 1 addition & 1 deletion src/mozc_version_template.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MAJOR=2
MINOR=17
BUILD=2307
BUILD=2308
REVISION=102
# NACL_DICTIONARY_VERSION is the target version of the system dictionary to be
# downloaded by NaCl Mozc.
Expand Down

0 comments on commit 26eec8d

Please sign in to comment.