Buffer.concat ignores a nonnumeric totalLength

オープン
#3,889 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
62/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
csharp, typescript
領域
backend

調査の方向性

Start by tracing SharpTS's implementation of Buffer.concat and how it handles the optional totalLength argument; the issue provides a JavaScript reproduction and Node.js v22.23.2 behavior to compare against. Run the reproduction in SharpTS and its IL-verified standalone, then find the relevant tests or add a regression case. Done when a nonnumeric totalLength produces the same TypeError and ERR_INVALID_ARG_TYPE behavior as Node.js.

索引モデルが issue の本文から書いたものです。

説明

Found while testing #3884. Run this as JavaScript.

const concat = Buffer.concat;
try { console.log(concat([Buffer.of(65)], '2').toString('hex')); }
catch (e) { console.log(e.name, e.code); }

Node.js v22.23.2 prints TypeError ERR_INVALID_ARG_TYPE. SharpTS interpretation and an IL-verified standalone infer the length and print 41.

主要言語
C#
スター
156
フォーク
4
平均マージ
13時間 20分
マージ済み PR(30日)
47

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

nickna/SharpTS のほかの issue

nickna/SharpTS の issue をすべて見る

似ている issue

C# の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。