Bug #491

makeが"string contains null byte"で失敗します

Added by Nobuhiro Tachino about 7 years ago. Updated over 4 years ago.

[ruby-dev:35948]
Status:Closed
Priority:Normal
Assignee:Nobuyoshi Nakada
ruby -v: Backport:

Description

=begin
刀野といいます。

ia64 linuxでruby 1.9のmakeが以下のメッセージで失敗します。

./miniruby -I./lib -I.ext/common -I./- -r./ext/purelib.rb ./enc/make_encdb.rb encdb.h.new ./enc enc
./tool/ifchange "encdb.h" "encdb.h.new"
encdb.h unchanged
/root/ruby/lib/fileutils.rb:967:in require': string contains null byte (ArgumentError)
from /root/ruby/lib/fileutils.rb:967:in
module:FileUtils'
from /root/ruby/lib/fileutils.rb:85:in <top (required)>'
from ./mkconfig.rb:11:in
require'
from ./mkconfig.rb:11:in `'
make: *** [.rbconfig.time] Error 1

file_expand_path()の中のBUFCHECKでバッファが正しく拡張されない
場合があるようです。パッチを作ってみました。

diff --git a/file.c b/file.c
index f2a6c46..f1ba684 100644
--- a/file.c
+++ b/file.c
@@ -2729,8 +2729,7 @@ file_expand_path(VALUE fname, VALUE dname, VALUE result)
if (p > buf && p[-1] == '/')
--p;
else {
- ++buflen;
- BUFCHECK(bdiff >= buflen);
+ BUFCHECK(bdiff + 1 >= buflen);
*p = '/';
}
=end

Associated revisions

Revision 19201
Added by Yukihiro Matsumoto almost 7 years ago

  • file.c (file_expand_path): applied a patch from Nobuhiro Tachino in . fix #491

Revision 19201
Added by Yukihiro Matsumoto almost 7 years ago

  • file.c (file_expand_path): applied a patch from Nobuhiro Tachino in . fix #491

History

#1 Updated by Koichi Sasada almost 7 years ago

  • Assignee set to Nobuyoshi Nakada

=begin

=end

#2 Updated by Yukihiro Matsumoto almost 7 years ago

  • Status changed from Open to Closed
  • % Done changed from 0 to 100

=begin
Applied in changeset r19201.
=end

Also available in: Atom PDF