Relational comparison of a negative BigInt with a negative fraction ignores the sign when exponents differ
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 82/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- c, javascript
- 領域
- compilers
調査の方向性
quickjs.c の js_bigint_float64_cmp から始め、特に 13588~13593 行付近の f != e 分岐を確認します。符号の扱いを仮数部の分岐と比較し、報告された -14n < -7.25 のケースで IsLessThan の動作を確認します。このケースで比較結果が true となり、既存の BigInt と Number の関係比較が引き続き正しく動作すれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Comparing a negative BigInt with a negative fractional Number returns the inverted result when the binary exponents differ.
console.log(-14n < -7.25);
Expected: true
Actual (observed): false
Spec: IsLessThan.
Version: quickjs-ng master, revision not recorded in the test build (source read at a36054a). Built with the quickjs-ng on our build host.
Fix note: js_bigint_float64_cmp (quickjs.c:13552), the f != e branch (13588-13593), returns from the exponents alone without the a_sign flip that the mantissa branch applies. Use if (f < e) return 2*a_sign-1; else return 1-2*a_sign;.
We found this while fuzzing.
Credit: https://ucsbplse.github.io/
- 主要言語
- C
- スター
- 3.9k
- フォーク
- 389
- 平均マージ
- 2日 2時間
- マージ済み PR(30日)
- 21
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
quickjs-ng/quickjs のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
quickjs-ng/quickjs#1971 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 79/100
quickjs-ng/quickjs#1970 ·
メンテナーはふだん 1 日以内に返信
-
`JS_ToCStringLen2` leaks the string when the UTF-8 buffer allocation fails対応中かも @bnoordhuis が 1 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
quickjs-ng/quickjs#1965 ·
メンテナーはふだん 1 日以内に返信
-
JS_SetPropertyInternal2 loses the value when a lazy property on the prototype runs out of memory対応中かも @TheNetherWatcher が 11 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
quickjs-ng/quickjs#1852 ·
メンテナーはふだん 1 日以内に返信
-
Object.prototype.propertyIsEnumerable converts `this` before the property key対応中かも @SomSamantray が 52 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
quickjs-ng/quickjs#1772 ·
メンテナーはふだん 1 日以内に返信
quickjs-ng/quickjs の issue をすべて見る
似ている issue
-
docs
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 61/100
メンテナーはふだん 13 日以内に返信
-
threadpool: a failed `pthread_cond_wait` makes Mlucas hang instead of stopping対応中かも @leinardi が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
primesearch/Mlucas#398 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 76/100
-
slice
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
Life-Framework/Life-Framework#6380 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信