Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

[2a] Remove incorrect Module._free(debugBuffer) call

オープン 初心者向け
#20 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

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

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
68/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
静か
技術スタック
javascript
領域
api

調査の方向性

まず src/ARFset.js:144 と js/arfset.api.js:114 の呼び出しを調べ、debugBuffer がどのように取得・管理されているかを確認します。両方の箇所から JS free の呼び出しを削除し、その後、JavaScript API が引き続きバッファーを正しく処理できることを確認するため、リポジトリで利用可能なチェックを実行します。

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

説明

Summary

Remove incorrect Module._free(debugBuffer) call that passes a typed-array view instead of a pointer

Environment

  • Product/Service: FeatureSET-Display — JavaScript API
  • Files: src/ARFset.js:144, js/arfset.api.js:114

Problem Description

Both src/ARFset.js:144 and js/arfset.api.js:114 call Module._free(debugBuffer) where debugBuffer is a Uint8ClampedArray view, not an integer heap pointer. Module._free expects a raw wasm memory address (integer). Passing a JS typed-array object is a no-op at best; if the JS engine coerces the object to a number that happens to land on a valid heap address, it silently corrupts the wasm heap.

The buffer itself is a view onto wasm memory owned and managed by the C++ side — JS must not free it.

Expected Behavior

No Module._free call is made from JS for this buffer. The C++ side manages its own memory.

Actual Behavior

Module._free is called with a Uint8ClampedArray object, which is either a silent no-op or a potential heap-corruption vector.

Tasks

  • Remove the bogus Module._free(debugBuffer) call from src/ARFset.js:144
  • Remove the bogus Module._free(debugBuffer) call from js/arfset.api.js:114

Impact

Medium — Potential wasm heap corruption if the coercion produces a valid-looking pointer; at minimum a latent correctness bug.

Additional Context

Small, isolated fix with no API surface change. Good candidate for an early "easy win" alongside 2b and 2c.

主要言語
JavaScript
スター
8
フォーク
2
PR マージ指標
30日以内にマージされた PR はありません

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

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

webarkit/FeatureSET-Display のほかの issue

webarkit/FeatureSET-Display の issue をすべて見る

似ている issue

JavaScript の issue をもっと見る

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

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