Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

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

Đang mở Phù hợp với người mới
#20 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
68/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Ít trao đổi
Công nghệ
javascript
Lĩnh vực
api

Hướng nghiên cứu

Bắt đầu bằng cách kiểm tra các lệnh gọi tại src/ARFset.js:144 và js/arfset.api.js:114, xem debugBuffer được lấy và quản lý như thế nào. Xóa các lệnh gọi JS free ở cả hai vị trí, sau đó chạy các bước kiểm tra hiện có của repository để xác nhận rằng JavaScript API vẫn xử lý buffer đúng cách.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
JavaScript
Star
8
Fork
2
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của webarkit/FeatureSET-Display

Tất cả issue của webarkit/FeatureSET-Display

Issue tương tự

Thêm issue về JavaScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.