diff options
author | k0kubun <k0kubun@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-10-19 15:08:55 +0000 |
---|---|---|
committer | k0kubun <k0kubun@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-10-19 15:08:55 +0000 |
commit | 320d7c54ba01a6a19ebec25dadab7196da95f3e7 (patch) | |
tree | f3ce851ace022201038c3df320a8f6c8e52215e8 /mjit.c | |
parent | 1a7249bc03615ffa77b23d08d8b287cce3ed10ee (diff) | |
download | ruby-320d7c54ba01a6a19ebec25dadab7196da95f3e7.tar.gz |
mjit.c: don't let MJIT.pause hang on full active units
test/ruby/test_rubyvm_mjit.rb: add reproductive test
[Bug #15071]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65179 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'mjit.c')
-rw-r--r-- | mjit.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -647,7 +647,7 @@ mjit_pause(int wait_p) tv.tv_sec = 0; tv.tv_usec = 1000; - while (unit_queue.length > 0) { + while (unit_queue.length > 0 && active_units.length < mjit_opts.max_cache_size) { /* inverse of condition that waits for mjit_worker_wakeup */ CRITICAL_SECTION_START(3, "in mjit_pause for a worker wakeup"); rb_native_cond_broadcast(&mjit_worker_wakeup); CRITICAL_SECTION_FINISH(3, "in mjit_pause for a worker wakeup"); |