Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

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

Aperta Adatta ai principianti
#20 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
68/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Tranquilla
Stack tecnologico
javascript
Ambito
api

Direzione di ricerca

Inizia esaminando le chiamate in src/ARFset.js:144 e js/arfset.api.js:114, verificando come viene ottenuto e gestito debugBuffer. Rimuovi le chiamate JS free da entrambe le posizioni, quindi esegui i controlli disponibili nel repository per confermare che l’API JavaScript gestisca ancora correttamente il buffer.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
JavaScript
Stelle
8
Fork
2
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di webarkit/FeatureSET-Display

Tutte le issue di webarkit/FeatureSET-Display

Issue simili

Altre issue su JavaScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.