[#35719] Windows-31J <-> UTF-8 roundtrip — Tanaka Akira <akr@...>
以下のように Windows-31J と UTF-8 が roundtrip するかどうか
成瀬です。
In article <48932335.7010209@airemix.jp>,
成瀬です。
In article <48935EBD.3010603@airemix.jp>,
成瀬です。
[#35724] $SAFE=4の場合のReadline::HISTORY.each — Takao Kouji <kouji@...7.net>
knu さんへ
[#35726] "\x01\x00\x00\x00\x00\x00\x00\x21".encode("utf-8", "utf-32be", :invalid=>:replace) — Tanaka Akira <akr@...>
UTF-32BE で、文字として正しくない 4バイトと、文字として正し
[#35733] Re: [ruby-core:18078] We'll release 1.8.6/1.8.7 this Friday, #2 — Urabe Shyouhei <shyouhei@...>
というわけでそろそろリリースしようと思います。予定日は8月8日です。問題点
[#35745] [Bug:1.9] default_external depends on the order of -K and -E — sheepman <sh@...>
こんにちは sheepman です。
成瀬です。
Yuguiです。
[#35763] 文字コードがシンボルでないのは何故? — take_tk <ggb03124@...>
たけ(tk)です。
なかだです。
たけ(tk)です
[#35789] [Ruby 1.9 - Bug #407] (Open) String#<< — Shyouhei Urabe <redmine@...>
チケット #407 が報告されました。 (by Shyouhei Urabe)
まつもと ゆきひろです
Yukihiro Matsumoto さんは書きました:
まつもと ゆきひろです
成瀬です。
At 08:00 08/09/20, NARUSE, Yui wrote:
まつもと ゆきひろです
[#35811] fail to build extension libraries that includes some ruby header files — "Yusuke ENDOH" <mame@...>
遠藤です。
[#35834] 「サポートレベル」の定義、1.9.1のサポート予定プラットフォーム、メンテナ募集 — "Yugui (Yuki Sonoda)" <yugui@...>
Yuguiです。
[#35845] [Bug #437] test_strftime(TestTime) fails on Solaris — Shugo Maeda <redmine@...>
Bug #437: test_strftime(TestTime) fails on Solaris
前田です。
さとうふみやす @ OSS テクノロジです。
まつもと ゆきひろです
前田です。
まつもと ゆきひろです
前田です。
前田です。
まつもと ゆきひろです
前田です。
[#35851] [Feature:1.9] name referencing in sprintf — "Yusuke ENDOH" <mame@...>
遠藤です。
[#35863] Refactoring of enumerating prime numbers — "Yugui (Yuki Sonoda)" <yugui@...>
Yuguiです。
けいじゅ@いしつかです.
Yuguiです。
けいじゅ@いしつかです.
なかだです。
けいじゅ@いしつかです.
なかだです。
けいじゅ@いしつかです.
Yuguiです。
けいじゅ@いしつかです.
[#35899] [Bug #466] test_str_crypt(TestM17NComb) failed — Kazuhiro NISHIYAMA <redmine@...>
Bug #466: test_str_crypt(TestM17NComb) failed
[#35904] [Feature:1.9] pack format 'm' based on RFC 4648 — "Yusuke ENDOH" <mame@...>
遠藤です。
チケット #471 が更新されました。 (by Yuki Sonoda)
遠藤です。
In article <e0b1e5700809220338g5f3b5627p95e94744d5c10505@mail.gmail.com>,
遠藤です。
In article <e0b1e5700809231144n376fd4eencfe06c49ed66665e@mail.gmail.com>,
遠藤です。
[#35906] %N for Time#strftime — "Shugo Maeda" <shugo@...>
前田です。
In article <704d5db90808210811p7f3aef73h97913ade156323f3@mail.gmail.com>,
なかだです。
まつもと ゆきひろです
[#35922] [Bug #475] cgi.rbにNKFに依存したコードが入っている — Takeyuki Fujioka <redmine@...>
Bug #475: cgi.rbにNKFに依存したコードが入っている
[#35945] Re: [ruby-list:45386] Re: [ANN] REXMLのDoS脆弱性 — "Shugo Maeda" <shugo@...>
前田です。
前田です。
In message <704d5db90809010656k2042969bx3d8a4abdafeeea8e@mail.gmail.com>
[#35954] Re: [ruby-cvs:26052] Ruby:r18834 (trunk): * compile.c (defined_expr): should handle NODE_{AND,OR} as — SASADA Koichi <ko1@...>
ささだです.
まつもと ゆきひろです
ささだです.
まつもと ゆきひろです
ささだです.
まつもと ゆきひろです
[#35977] block parameter for Delagator — keiju@... (Keiju ISHITSUKA)
けいじゅ@いしつかです.
[#35986] 1.9と1.8で、delegateのインスタンスのクラス名の違う — Fujioka <fuj@...>
xibbarこと藤岡です。
まつもと ゆきひろです
けいじゅ@いしつかです.
藤岡です。
けいじゅ@いしつかです.
こんにちは、なかむら(う)です。
[#36008] [Bug #505] 1.upto 2 {|i| p i } — Shyouhei Urabe <redmine@...>
Bug #505: 1.upto 2 {|i| p i }
[#36028] [Bug #513] Tempfile yields [BUG] Stack consistency error — Shyouhei Urabe <redmine@...>
Bug #513: Tempfile yields [BUG] Stack consistency error
[#36033] [Bug #515] String#rindexが期待通りに動かない — Takeyuki Fujioka <redmine@...>
Bug #515: String#rindexが期待通りに動かない
[#36048] TypeError from Encoding.compatible? (r18920) — Yukihiro Matsumoto <matz@...>
まつもと ゆきひろです
[#36066] Numeric#scalar? — Tadayoshi Funaba <tadf@...>
1.9 の Numeric#scalar? について、適当でないのでは (real? などのほうがい
原です。
> やはり、scalar? はずれているんじゃないかな。real? の方がいい
原です。
> ここで、scalar? を疑問視する理由を復習すると、たとえば、「複
1.9.1 までに時間がないので scalar? だけ何とかしたいと思っていましたが、
前田です。
原です。
[ruby-dev:35880] メモリリーク詰め合わせ
浜地です。
いくつかメモリリークを見つけたので報告しておきます。
重要なのは transcode.c だけかと思います。
* test/ruby/test_transcode.rb
二箇所リークしてるかなと思います。
一箇所は trans_open_i からかえってきた
entries を解放してないもので、
"\x8f\xbc\x96\x7b\x8d\x73\x8d\x4f".encode('utf-8', 'shift_jis')
あたりで再現します。
もう一箇所は in_buf_start を解放してないもので、
"\xA1\xA1\xFF".encode("ISO-2022-JP", "EUC-JP", invalid: :replace)
あたりで再現しました。
* test/strscan/test_strscan.rb
require 'strscan'
ss = StringScanner.new("\xA1\xA2".force_encoding("euc-jp"))
t = ss.scan(/./)
でリークします。 re.c をまねして修正してみましたが、
これで正しいかはよくわかってません。
* test/openssl/*
あちこちでリークしてるぽいのですが、
とりあえず手軽に目に入った二箇所を修正しておきました。
ついでにヘンなものを作ったので紹介させてください。
valgrind の出力に Ruby でどの行を実行した時に
確保したメモリなのかを混ぜて出力させるものを作りました。
ほどほどには動いてるみたいです。
http://d.hatena.ne.jp/shinichiro_h/20080817#1218922824
Index: ext/openssl/ossl_config.c
===================================================================
--- ext/openssl/ossl_config.c (revision 18709)
+++ ext/openssl/ossl_config.c (working copy)
@@ -443,8 +443,10 @@
eConfigError = rb_define_class_under(mOSSL, "ConfigError", eOSSLError);
cConfig = rb_define_class_under(mOSSL, "Config", rb_cObject);
+ const char *default_config_file = CONF_get1_default_config_file();
rb_define_const(cConfig, "DEFAULT_CONFIG_FILE",
- rb_str_new2(CONF_get1_default_config_file()));
+ rb_str_new2(default_config_file));
+ OPENSSL_free(default_config_file);
rb_include_module(cConfig, rb_mEnumerable);
rb_define_singleton_method(cConfig, "parse", ossl_config_s_parse, 1);
rb_define_alias(CLASS_OF(cConfig), "load", "new");
Index: ext/openssl/ossl_x509ext.c
===================================================================
--- ext/openssl/ossl_x509ext.c (revision 18709)
+++ ext/openssl/ossl_x509ext.c (working copy)
@@ -331,6 +331,7 @@
ASN1_OCTET_STRING_free(asn1s);
ossl_raise(eX509ExtError, NULL);
}
+ free(s);
GetX509Ext(self, ext);
X509_EXTENSION_set_data(ext, asn1s);
Index: ext/strscan/strscan.c
===================================================================
--- ext/strscan/strscan.c (revision 18709)
+++ ext/strscan/strscan.c (working copy)
@@ -407,6 +407,7 @@
struct strscanner *p;
regex_t *re;
int ret;
+ int tmpreg;
Check_Type(regex, T_REGEXP);
GET_SCANNER(self, p);
@@ -416,6 +417,9 @@
return Qnil;
}
re = rb_reg_prepare_re(regex, p->str);
+ tmpreg = re != RREGEXP(regex)->ptr;
+ if (!tmpreg) RREGEXP(regex)->usecnt++;
+
if (headonly) {
ret = onig_match(re, (UChar* )CURPTR(p),
(UChar* )(CURPTR(p) + S_RESTLEN(p)),
@@ -427,6 +431,16 @@
(UChar* )CURPTR(p), (UChar* )(CURPTR(p) + S_RESTLEN(p)),
&(p->regs), ONIG_OPTION_NONE);
}
+ if (!tmpreg) RREGEXP(re)->usecnt--;
+ if (tmpreg) {
+ if (RREGEXP(regex)->usecnt) {
+ onig_free(re);
+ }
+ else {
+ onig_free(RREGEXP(regex)->ptr);
+ RREGEXP(regex)->ptr = re;
+ }
+ }
if (ret == -2) rb_raise(ScanError, "regexp buffer overflow");
if (ret < 0) {
Index: transcode.c
===================================================================
--- transcode.c (revision 18709)
+++ transcode.c (working copy)
@@ -743,14 +743,18 @@
num_trans = transcode_search_path(from, to, trans_open_i, (void *)&entries);
- if (num_trans < 0 || !entries)
+ if (num_trans < 0 || !entries) {
+ xfree(entries);
return NULL;
+ }
if (flags & (ECONV_CRLF_NEWLINE_ENCODER|ECONV_CR_NEWLINE_ENCODER)) {
const char *name = (flags & ECONV_CRLF_NEWLINE_ENCODER) ? "crlf_newline" : "cr_newline";
transcoder_entry_t *e = get_transcoder_entry("", name);
- if (!e)
+ if (!e) {
+ xfree(entries);
return NULL;
+ }
MEMMOVE(entries+1, entries, transcoder_entry_t *, num_trans);
entries[0] = e;
num_trans++;
@@ -758,12 +762,15 @@
if (flags & ECONV_UNIVERSAL_NEWLINE_DECODER) {
transcoder_entry_t *e = get_transcoder_entry("universal_newline", "");
- if (!e)
+ if (!e) {
+ xfree(entries);
return NULL;
+ }
entries[num_trans++] = e;
}
ec = rb_econv_open_by_transcoder_entries(num_trans, entries);
+ xfree(entries);
if (!ec)
rb_raise(rb_eArgError, "encoding conversion not supported (from %s to %s)", from, to);
@@ -1200,7 +1207,7 @@
if (ec->elems[i].out_buf_start)
xfree(ec->elems[i].out_buf_start);
}
-
+ xfree(ec->in_buf_start);
xfree(ec->elems);
xfree(ec);
}