Project

General

Profile

Actions

Bug #3534

closed

"Branch condition evaluates to a garbage value" in function `swallow' of io.c

Added by mame (Yusuke Endoh) almost 15 years ago. Updated about 14 years ago.

Status:
Closed
Target version:
-
ruby -v:
ruby 1.9.3dev (2010-06-29 trunk 28465) [i686-linux]
Backport:
[ruby-dev:41803]

Description

=begin
遠藤です。

Clang Static Analyzer を使ってみたら、io.c の swallow 関数が
ローカル変数 i を初期化せずに条件文その他に使っていることを
見つけてくれました。

2291 int i;
2292 if (needconv) {
2293 if (*p != term) return TRUE;
2294 while (--i && *++p == term);
2295 }

usa さんが書いたコードのようなので usa さんを担当者にしておき
ます。

ちなみに concov によると、テストでこの if の then 節は一度も
実行されていないようです。

--
Yusuke Endoh
=end

Actions #1

Updated by nobu (Nobuyoshi Nakada) almost 15 years ago

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

=begin
This issue was solved with changeset r28537.
Yusuke, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.

=end

Actions

Also available in: Atom PDF

Like0
Like0