https://redmine.ruby-lang.org/https://redmine.ruby-lang.org/favicon.ico?17113305112011-08-09T09:55:01ZRuby Issue Tracking SystemRuby master - Bug #5171: [PATCH] date_core: RB_GC_GUARD temporary stringshttps://redmine.ruby-lang.org/issues/5171?journal_id=201692011-08-09T09:55:01Znormalperson (Eric Wong)normalperson@yhbt.net
<ul><li><strong>File</strong> <a href="/attachments/1984">0001-ext-date-date_strftime.c-date_strftime_with_tmx-RB_G.patch</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/1984/0001-ext-date-date_strftime.c-date_strftime_with_tmx-RB_G.patch">0001-ext-date-date_strftime.c-date_strftime_with_tmx-RB_G.patch</a> added</li></ul><p>I also have an extra safety fix in case date_strftime_with_tmx() changes<br>
in the future:</p>
<p>ext/date/date_strftime.c (date_strftime_with_tmx): RB_GC_GUARD safety fix</p>
<p>I don't think this has the potential to /currently/ cause errors<br>
because the pointer is used immediately (before further<br>
allocations). However it is still a risk if the code changes<br>
and allocates later in the function.</p>
<p>There should also be a minor speedup from avoiding strlen().</p>
<p>git pull git://bogomips.org/ruby date-tmx_zone-paranoia</p> Ruby master - Bug #5171: [PATCH] date_core: RB_GC_GUARD temporary stringshttps://redmine.ruby-lang.org/issues/5171?journal_id=202492011-08-13T17:08:03Ztadf (tadayoshi funaba)
<ul><li><strong>Status</strong> changed from <i>Open</i> to <i>Closed</i></li></ul>