https://bugs.ruby-lang.org/
https://bugs.ruby-lang.org/favicon.ico?1711330511
2011-07-06T21:16:00Z
Ruby Issue Tracking System
Ruby master - Bug #4983: Fiberのガードページの設定が間違ってる
https://bugs.ruby-lang.org/issues/4983?journal_id=18870
2011-07-06T21:16:00Z
kosaki (Motohiro KOSAKI)
kosaki.motohiro@gmail.com
<ul></ul><p>別件でささださんに質問があるのですが、ファイバーのスタックサイズは</p>
<p>#define FIBER_MACHINE_STACK_ALLOCATION_SIZE (0x10000 / sizeof(VALUE))</p>
<p>のように sizeof(VALUE)での割り算を入れることにより、sizeof(VALUE)の倍数を保とうとしている痕跡がありますが、<br>
ガードページ用に1ページ食われてしまうので、結局、真のスタックサイズは sizeof(VALUE)の倍数である保証は<br>
なくなってしまっています。<br>
これは問題ないでしょうか?それとも意図を誤読してます?</p>
Ruby master - Bug #4983: Fiberのガードページの設定が間違ってる
https://bugs.ruby-lang.org/issues/4983?journal_id=18871
2011-07-06T21:29:10Z
kosaki (Motohiro KOSAKI)
kosaki.motohiro@gmail.com
<ul><li><strong>Status</strong> changed from <i>Assigned</i> to <i>Closed</i></li><li><strong>% Done</strong> changed from <i>0</i> to <i>100</i></li></ul><p>This issue was solved with changeset r32421.<br>
Motohiro, thank you for reporting this issue.<br>
Your contribution to Ruby is greatly appreciated.<br>
May Ruby be with you.</p>
<hr>
<ul>
<li>cont.c (fiber_machine_stack_alloc): fix mprotect misuse. A stack<br>
guard page should have PROT_NONE.</li>
<li>cont.c (fiber_initialize_machine_stack_context):<br>
th->machine_stack_maxsize shouldn't be included guard pages size.<br>
[Bug <a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Bug: Fiberのガードページの設定が間違ってる (Closed)" href="https://bugs.ruby-lang.org/issues/4983">#4983</a>]<a href="/issues/4983">[ruby-dev:44043]</a></li>
</ul>