swiftwasm / swiftwasm/JavaScriptKit

Memory corruption take 2

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

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

主要言語
Swift
スター
986
フォーク
76
平均マージ
21時間 11分
マージ済み PR(30日)
4

説明

I still see the following crash if I re-enable the Examples/Testing tests.

https://github.com/swiftwasm/JavaScriptKit/blob/84243a4c66d47e17c540bbdc17ef49f191840a07/Plugins/PackageToJS/Tests/ExampleTests.swift#L249-L250


   RuntimeError: memory access out of bounds
       at CounterPackageTests.xctest.dlmalloc (wasm://wasm/CounterPackageTests.xctest-0f40d596:wasm-function[89702]:0x115e7de)
       at CounterPackageTests.xctest.malloc (wasm://wasm/CounterPackageTests.xctest-0f40d596:wasm-function[89701]:0x115e22a)
       at CounterPackageTests.xctest.swift::Demangle::__runtime::Demangler::demangleBoundGenerics(swift::Demangle::__runtime::Vector<swift::Demangle::__runtime::Node*>&, swift::Demangle::__runtime::Node*&) (wasm://wasm/CounterPackageTests.xctest-0f40d596:wasm-function[28248]:0x522adc)
       at CounterPackageTests.xctest.swift::Demangle::__runtime::Demangler::demangleBoundGenericType() (wasm://wasm/CounterPackageTests.xctest-0f40d596:wasm-function[28200]:0x512379)
       at CounterPackageTests.xctest.swift::Demangle::__runtime::Demangler::demangleOperator() (wasm://wasm/CounterPackageTests.xctest-0f40d596:wasm-function[28174]:0x50e156)
       at CounterPackageTests.xctest.swift::Demangle::__runtime::Demangler::demangleType(__swift::__runtime::llvm::StringRef, std::__2::function<swift::Demangle::__runtime::Node* (swift::Demangle::__runtime::SymbolicReferenceKind, swift::Demangle::__runtime::Directness, int, void const*)>) (wasm://wasm/CounterP
ackageTests.xctest-0f40d596:wasm-function[28172]:0x50db25)
       at CounterPackageTests.xctest.swift_getTypeByMangledName (wasm://wasm/CounterPackageTests.xctest-0f40d596:wasm-function[27912]:0x4ee2ad)
       at CounterPackageTests.xctest.(anonymous namespace)::DecodedMetadataBuilder::resolveOpaqueType(swift::Demangle::__runtime::Node*, __swift::__runtime::llvm::ArrayRef<__swift::__runtime::llvm::ArrayRef<swift::MetadataPackOrValue>>, unsigned int) (wasm://wasm/CounterPackageTests.xctest-0f40d596:wasm-functio
n[27992]:0x500764)
       at CounterPackageTests.xctest.swift::Demangle::__runtime::TypeDecoder<(anonymous namespace)::DecodedMetadataBuilder>::decodeMangledType(swift::Demangle::__runtime::Node*, unsigned int, bool) (wasm://wasm/CounterPackageTests.xctest-0f40d596:wasm-function[27925]:0x4f3cfe)
       at CounterPackageTests.xctest.swift::Demangle::__runtime::TypeDecoder<(anonymous namespace)::DecodedMetadataBuilder>::decodeGenericArgs(swift::Demangle::__runtime::Node*, unsigned int, __swift::__runtime::llvm::SmallVectorImpl<swift::MetadataPackOrValue>&) (wasm://wasm/CounterPackageTests.xctest-0f40d596
:wasm-function[27971]:0x4fc426)

Toolchain version: DEVELOPMENT-SNAPSHOT-2025-10-02-a

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

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

はじめの一歩

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

調査の方向性

Examples/Testing と ExampleTests.swift の参照されている 249-250 行から始め、次に DEVELOPMENT-SNAPSHOT-2025-10-02-a toolchain を使ってクラッシュを再現します。報告されたメモリアクセスの失敗をテスト実行中に追跡します。再有効化したテストが out-of-bounds クラッシュなしで完了すれば完了です。

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

評価

技術スタック
swift, wasm
領域
testing
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
35/100

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

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