Project

General

Profile

Actions

Bug #491

closed

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

Added by ntachino (Nobuhiro Tachino) about 16 years ago. Updated over 13 years ago.

Status:
Closed
Target version:
-
ruby -v:
Backport:
[ruby-dev:35948]

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
Actions

Also available in: Atom PDF

Like0
Like0Like0