チケット #45917

fc_rand(): 'do { ... } while (size > 1)' run once for size == 1

登録: 2022-10-18 17:37 最終更新: 2023-04-09 18:00

報告者:
担当者:
チケットの種類:
状況:
完了
コンポーネント:
マイルストーン:
優先度:
5 - 中
重要度:
5 - 中
解決法:
修正済み
ファイル:
2

詳細

fc_rand() (actually fc_rand_debug() ) is not supposed to do any work for (size <= 1), as it even has a comment about initializing stuff for such size:

/*
* These assignments are only here to make the compiler
* happy. Since each usage is guarded with a if (size > 1).
*/

But the loop there is a "do ... while()" one, so it always execute once.

チケットの履歴 (10 件中 3 件表示)

2022-10-18 17:37 更新者: cazfi
  • 新しいチケット "fc_rand(): 'do { ... } while (size > 1)' run once for size == 1" が作成されました
2022-12-05 00:20 更新者: cazfi
2023-01-30 13:00 更新者: cazfi
2023-03-25 12:35 更新者: cazfi
  • 担当者(未割り当て) から cazfi に更新されました
  • 解決法なし から 受領 に更新されました
2023-03-25 12:43 更新者: cazfi
コメント

This means that fc_rand(1) (or fc_rand(0) ) no longer change the random state at all. While it's unlikely that anything has relied on the old behavior of any fc_rand() call to change random state, it's possible that this reveals some subtle bug.

2023-03-27 11:56 更新者: cazfi
コメント

Reply To cazfi

it's possible that this reveals some subtle bug.

With risk like this, and issue being fixed being so minor -> not to 3.0.7 in the last minute.

2023-04-01 13:49 更新者: cazfi
コメント

Pushed to branches other than S3_0. S3_0 waiting for 3.0.7 release.

2023-04-09 18:00 更新者: cazfi
  • 状況オープン から 完了 に更新されました
  • 解決法受領 から 修正済み に更新されました

添付ファイルリスト

編集

ログインしていません。ログインしていない状態では、コメントに記載者の記録が残りません。 » ログインする