`--newyork` returns 32 bytes from a 16-byte heap
I maintainer di solito rispondono entro 3 giorni
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 66/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- rust
- Ambito
- backend-api-design
Direzione di ricerca
Start by tracing how the --newyork pipeline handles heap bounds for the Yul mstore and return operations; the issue gives a minimal reproducer and the relevant compiler options. Compare execution with --heap-size 16 and --heap-size 32 across both pipelines and optimization levels. Done means the 16-byte heap traps with ContractTrapped under both pipelines, while the 32-byte heap returns the same 32-byte word.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
With --heap-size 16, mstore(off, 1); return(off, 32) at off = 0 traps with ContractTrapped under the baseline pipeline, but succeeds and returns a 32-byte word under --newyork at -O0, -O1, -O2, -O3, -Os, and -Oz. With --heap-size 32, both pipelines return the same 32-byte word.
object "C" {
code { stop() }
object "C_deployed" {
code {
let off := calldataload(0)
mstore(off, 1)
return(off, 32)
}
}
}
$ resolc --yul --bin --overwrite --heap-size 16 repro.yul -o base16
Compiler run successful. Artifact(s) can be found in directory "base16".
$ resolc --yul --newyork --optimization 0 --bin --overwrite --heap-size 16 repro.yul -o ny16
Compiler run successful. Artifact(s) can be found in directory "ny16".
$ RUST_LOG=runtime::revive=trace revive-runner -f base16/repro.yul:C.pvm 2>&1 | grep 'Bare call ends'
[TRACE runtime::revive] Bare call ends: result=Err(ExecError { error: Module(ModuleError { index: 3, error: [11, 0, 0, 0], message: Some("ContractTrapped") }), origin: Callee }), weight_consumed=Weight { ref_time: 4495653, proof_size: 362 }, weight_required=Weight { ref_time: 4495653, proof_size: 362 }, storage_deposit=Charge(0), gas_consumed=0, max_storage_deposit=Charge(0)
$ RUST_LOG=runtime::revive=trace revive-runner -f ny16/repro.yul:C.pvm 2>&1 | grep 'Bare call ends'
[TRACE runtime::revive] Bare call ends: result=Ok(ExecReturnValue { flags: (empty), data: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1] }), weight_consumed=Weight { ref_time: 6612187, proof_size: 462 }, weight_required=Weight { ref_time: 6612187, proof_size: 462 }, storage_deposit=Charge(0), gas_consumed=0, max_storage_deposit=Charge(0)
$ resolc --yul --bin --overwrite --heap-size 32 repro.yul -o base32
Compiler run successful. Artifact(s) can be found in directory "base32".
$ resolc --yul --newyork --optimization 0 --bin --overwrite --heap-size 32 repro.yul -o ny32
Compiler run successful. Artifact(s) can be found in directory "ny32".
$ RUST_LOG=runtime::revive=trace revive-runner -f base32/repro.yul:C.pvm 2>&1 | grep 'Bare call ends'
[TRACE runtime::revive] Bare call ends: result=Ok(ExecReturnValue { flags: (empty), data: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1] }), weight_consumed=Weight { ref_time: 14711211, proof_size: 765 }, weight_required=Weight { ref_time: 14711211, proof_size: 765 }, storage_deposit=Charge(0), gas_consumed=0, max_storage_deposit=Charge(0)
$ RUST_LOG=runtime::revive=trace revive-runner -f ny32/repro.yul:C.pvm 2>&1 | grep 'Bare call ends'
[TRACE runtime::revive] Bare call ends: result=Ok(ExecReturnValue { flags: (empty), data: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1] }), weight_consumed=Weight { ref_time: 6201286, proof_size: 455 }, weight_required=Weight { ref_time: 6201286, proof_size: 455 }, storage_deposit=Charge(0), gas_consumed=0, max_storage_deposit=Charge(0)
Expected behavior: the call traps with ContractTrapped under both pipelines when the configured 16-byte heap cannot hold a 32-byte store and return.
Git commit: 04e8decf76500000e1660919b2016ff776cf0c28
- Lingua principale
- Rust
- Stelle
- 104
- Fork
- 28
- Merge medio
- 5g 14h
- PR unite (30g)
- 24
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Nessun modello di pull request
- Nessuna 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 paritytech/revive
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
paritytech/revive#749 ·
I maintainer di solito rispondono entro 3 giorni
-
NY: ICEs on a variable assigned in a bare Yul block and read after itForse già presa @elle-j l’ha presa 14 giorni fa. Aperta
paritytech/revive#733 · 1 assegnatario ·
I maintainer di solito rispondono entro 3 giorni
-
resolc -O0 never terminates on a reachable empty-body infinite loopForse già presa @xermicus l’ha presa 14 giorni fa. Aperta
paritytech/revive#732 · 1 commento · 1 reazione · 1 assegnatario ·
I maintainer di solito rispondono entro 3 giorni
-
`--libraries` fails for a library found through `--include-path`Forse di nuovo libera @xermicus l’ha presa 30 giorni fa e non c’è nessuna pull request aperta. Apertabug
paritytech/revive#717 · 1 assegnatario ·
I maintainer di solito rispondono entro 3 giorni
-
Standard JSON fails on `amsterdam` with `settings.experimental: true`Forse di nuovo libera @xermicus l’ha presa 35 giorni fa e non c’è nessuna pull request aperta. Apertabug
paritytech/revive#712 · 1 assegnatario ·
I maintainer di solito rispondono entro 3 giorni
Tutte le issue di paritytech/revive
Issue simili
-
Bash init calls `cygpath` unconditionally on Windows, which breaks non-Cygwin shells like `brush`Forse già presa @iliqiliev l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
ajeetdsouza/zoxide#1381 ·
I maintainer di solito rispondono entro 5 giorni
-
triage
Difficoltà 1/5 1-3 ore Idoneità per principianti 88/100
kornia/kornia-rs#1416 · 1 commento ·
I maintainer di solito rispondono entro 2 giorni
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
I maintainer di solito rispondono entro 2 giorni
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
swc-project/swc-next-issues#1043 ·
-
compiler P2
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
HerringtonDarkholme/hd-lang#2436 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno