Inlining breaks asyncify
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 38/100
- Tipo di issue
- Bug
- Chiarezza
- Da chiarire
- Stato di attività
- Ferma
- Stack tecnologico
- wasm
- Ambito
- compilers
Direzione di ricerca
Inizia riproducendo il problema con l’input.wat mostrato usando bin/wasm-opt -O2 --asyncify -S, quindi esegui output.wat con bin/wasm-shell e confronta la sequenza stampata. Esamina il commit 1a6efdb4233a077bc6e5e8a340baf5672bb5bced e il comportamento di asyncify/inlining che ha modificato. Il lavoro è completato quando il modulo trasformato conserva l’output previsto 1, 2, 1, 3, 3.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
While reading @kripken 's post on asyncify, I gave the test case shown a go:
(memory 1 1)
(import "spectest" "print" (func $print (param i32)))
(import "asyncify" "start_unwind" (func $asyncify_start_unwind (param i32)))
(import "asyncify" "stop_unwind" (func $asyncify_stop_unwind))
(import "asyncify" "start_rewind" (func $asyncify_start_rewind (param i32)))
(import "asyncify" "stop_rewind" (func $asyncify_stop_rewind))
(global $sleeping (mut i32) (i32.const 0))
(start $runtime)
(func $main
(call $print (i32.const 1))
(call $sleep)
(call $print (i32.const 3))
)
(func $sleep
(if
(i32.eqz (global.get $sleeping))
(block
;; Start to sleep.
(global.set $sleeping (i32.const 1))
(i32.store (i32.const 16) (i32.const 24))
(i32.store (i32.const 20) (i32.const 1024))
(call $asyncify_start_unwind (i32.const 16))
)
(block
;; Resume after sleep.
(call $asyncify_stop_rewind)
(global.set $sleeping (i32.const 0))
)
)
)
(func $runtime
;; Call main the first time, let the stack unwind.
(call $main)
(call $asyncify_stop_unwind)
;; We could do anything we want around here while
;; the code is paused!
(call $print (i32.const 2))
;; Set the rewind in motion.
(call $asyncify_start_rewind (i32.const 16))
(call $main)
)
)
I was quite surprised that after:
$ bin/wasm-opt -o output.wat input.wat -O2 --asyncify -S
$ bin/wasm-shell output.wat
BUILDING MODULE [line: 1]
1 : i32
3 : i32
2 : i32
1 : i32
3 : i32
Bisecting shows that the first bad commit is https://github.com/WebAssembly/binaryen/commit/1a6efdb4233a077bc6e5e8a340baf5672bb5bced . The title of the issue is an assumption due to the description in the first bad commit.
- Lingua principale
- WebAssembly
- Stelle
- 8.6k
- Fork
- 885
- Merge medio
- 2g 4h
- PR unite (30g)
- 77
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di WebAssembly/binaryen
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
WebAssembly/binaryen#9135 · 1 commento ·
-
Difficoltà 2/5 Mezza giornata Idoneità per principianti 76/100
WebAssembly/binaryen#9018 · 3 commenti ·
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
WebAssembly/binaryen#9133 ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 52/100
WebAssembly/binaryen#9123 ·
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
WebAssembly/binaryen#9122 ·
Tutte le issue di WebAssembly/binaryen
Issue simili
-
flang:fir-hlfir
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
llvm/llvm-project#225935 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
objectionary/eo#8923 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
Coarray integration tests carry no LABELS, so run_tests.py silently skips them under every backend Apertacoarray
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100