Support for emitting data that allows reconstructing original stack trace frames (including inlined frames)

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

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

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
25/100
issue の種類
機能追加
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
wasm
領域
compilers

調査の方向性

まず Binaryen の現在の source-map サポート、DWARF モード、wasm2wasm オプティマイザーの動作を確認し、その後、issue と関連する Binaryen issue 4814 で説明されている 3 つのメタデータ方式を比較します。完了時には、オフラインでのスタックデコード用にインラインフレームを保持する明確な方法が提供され、ブラウザーのサポートも設計の一環として評価されている必要があります。

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

説明

The current support for source maps does not allow decoding stack traces in a way that preserves inlined frames. This is problematic as a stack trace from production may not make too much sense if important frames are missing.

At the minimum one would want to have a way to decode production stacks offline with a tool.
Better would be if this also worked nicely in the browser (especially for a world where compile-to-js languages start using compile-to-wasm-gc and may want to do that not only for production but also development use case)

There's a few options:

  • Make use of the fact that source maps is a json format which allows emitting extra (i.e. non-specified) information in it (this is the approach of dart2js).
  • Rely on DWARF instead of source maps. Currently binaryen disables some optimizations when dwarf mode is enabled. It's unclear if these optimizations have to be disabled if we only care about correct inlined frames in dwarf or they are disabled due to supporting other dwarf features.
    => See also https://github.com/WebAssembly/binaryen/issues/4814
  • Have a separate, generic mechanism that allows attaching metadata to things in the wasm file (instructions, globals, ...) and ensure the wasm2wasm optimizer preserves this information.

/cc @biggs0125 @osa1

主要言語
WebAssembly
スター
8.6k
フォーク
885
平均マージ
2日 1時間
マージ済み PR(30日)
70

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

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

WebAssembly/binaryen のほかの issue

WebAssembly/binaryen の issue をすべて見る

似ている issue

Compilers の issue をもっと見る

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

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