Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

WASM traces do not correspond to expected offsets

未关闭
#328 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
25/100
Issue 类型
缺陷
描述清晰度
需要澄清
活跃度
停滞
技术栈
javascript, wasm

调研方向

首先使用 Jest 22+ 复现 WASM stack-trace 重写,并比较恢复默认 prepareStackTrace 行为前后的输出。重点关注 wasm-function 偏移量与生成的行号和列号值之间的差异;完成的标准是明确或纠正重写后的值是否能够支持基于 DWARF 的转换。

由索引模型根据 Issue 内容生成。

描述

Hi! I am arriving here via using jest 22+. I have quite a headache debugging why my WASM stack traces in jest:

RuntimeError: Aborted(-1)
    at abort (/mnt/user-data/adam/scratch/out.js:986:11)
    at _logstr (/mnt/user-data/adam/scratch/out.js:1502:36)
    at void info<char const*, unsigned long, char const*>(char const*, unsigned long, char const*) (wasm://wasm/16a7a962:wasm-function[236]:0x548d7)
    at test_async_func (wasm://wasm/16a7a962:wasm-function[235]:0x547d4)

were being rewritten:

RuntimeError: Aborted(-1)
    at abort (/mnt/user-data/adam/scratch/out.js:986:11)
    at _logstr (/mnt/user-data/adam/scratch/out.js:1502:36)
    at void info<char const*, unsigned long, char const*>(char const*, unsigned long, char const*) (wasm://wasm/16a7a962:1:346266)
    at test_async_func (wasm://wasm/16a7a962:1:346007)

This interfered with the way I was transforming to line numbers as these numbers don't quite line up.
I came to this repo as restoring prepareStackTrace to the default alleviated the issue (of course, also disabling source maps though) I was wondering if light could be shed on the behaviour, I'm not sure how this rewrite was intended to be used but I cannot pass this through a DWARF-based stack trace translator, at least not in a way I can see

Thanks for any insight
Adam

主要语言
JavaScript
星标
2.2k
派生
220
PR 合并指标
30 天内没有已合并 PR

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

evanw/node-source-map-support 的其他 Issue

查看 evanw/node-source-map-support 的全部 Issue

相似的 Issue

更多 JavaScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。