On Windows the .size ShmemConf parameter is not respected
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 35/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Stack tecnologico
- rust
- Ambito
- operating-systems
Direzione di ricerca
Inizia da tests/general.rs, in particolare dal test share_data intorno alla riga 109, ed esegui cargo test su Windows per riprodurre la discrepanza di dimensione. Segui il percorso di apertura della memoria condivisa di Windows e confronta la lunghezza del buffer riportata con la dimensione ShmemConf richiesta; il lavoro è completo quando il test passa per un buffer piccolo senza modificare il comportamento su Linux.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Hello,
On linux if I ask to open a piece of Memory created somewhere else with a size, that size is the size of the buffer returned. On Windows if I do this (for a small buffer) I get 4096 - which I assume is the default smallest size for a piece of Windows shared memory. This means that the producer thinks it has buffer len x, while the consumer thinks it's working with buffer len 4096 (for a small buffer).
I think instead of using MEMORY_BASIC_INFORMATION.RegionSize the size from the opts should be taken, do you agree?
I've updated a test here to demonstrate this.
$ cargo test
Compiling shared_memory v0.12.5 (C:\Users\Max\Documents\GitHub\shared_memory)
Finished test [unoptimized + debuginfo] target(s) in 0.66s
Running unittests src\lib.rs (target\debug\deps\shared_memory-baddeea1e8dc4909.exe)
running 0 tests
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
Running tests\general.rs (target\debug\deps\general-356fc0d2e34d7138.exe)
running 5 tests
test share_data ... FAILED
test create_new ... ok
test open_os_id ... ok
test create_with_flink ... ok
test open_flink ... ok
failures:
---- share_data stdout ----
thread 'share_data' panicked at tests\general.rs:109:5:
assertion `left == right` failed
left: 4
right: 4096
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
failures:
share_data
test result: FAILED. 4 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.01s
error: test failed, to rerun pass `--test general`
Would you be happy for me to make this change?
- Lingua principale
- Rust
- Stelle
- 442
- Fork
- 63
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
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 elast0ny/shared_memory
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 20/100
elast0ny/shared_memory#119 ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 38/100
elast0ny/shared_memory#115 · 1 reazione ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
elast0ny/shared_memory#114 · 1 commento ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 45/100
elast0ny/shared_memory#110 ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 48/100
elast0ny/shared_memory#108 · 1 commento ·
Tutte le issue di elast0ny/shared_memory
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
TheLarkInn/aipm#2413 ·
-
documentation
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
alexgorbatchev/simple-ptt#15 ·
-
tooling
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
todo:ticket
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
taikoxyz/taiko-mono#22168 · 1 commento ·