setUnicodeLocale is dangerous and might lead to segmentation faults
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 25/100
- Tipo di issue
- Bug
- Chiarezza
- Da chiarire
- Stato di attività
- Ferma
- Stack tecnologico
- haskell
- Ambito
- backend, internationalization
Direzione di ricerca
Start by locating the setUnicodeLocale implementation and all of its call sites in the Snap server code. Review how it interacts with setenv, getenv, and threaded startup, then determine the intended locale behavior and define regression coverage for the reported segmentation-fault risk.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
The underlying problem is that setenv is not thread safe as simultaneous call to getenv in multithreaded enviroment might lead to segmentation fault by attempting to dereference a null pointer (relevant glibc ticket).
Considering that snap is usually started in a separate thread, this creates a serious issue, because a wide variety of functions call getenv internally (see above ticket for more info).
I personally encountered this problem when using ekg (which uses snap internally).
To be fair, I'm not sure why locale is set there to begin with.
- Lingua principale
- Haskell
- Stelle
- 197
- Fork
- 87
- 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 snapframework/snap-server
-
Timeout for pure values Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 38/100
snapframework/snap-server#118 · 5 commenti ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
snapframework/snap-server#94 · 1 reazione ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 25/100
snapframework/snap-server#92 · 2 commenti ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 25/100
snapframework/snap-server#85 · 8 commenti ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 25/100
snapframework/snap-server#77 · 2 commenti ·
Tutte le issue di snapframework/snap-server
Issue simili
-
typst-0.12 Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
commercialhaskell/stackage#8127 ·
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
input-output-hk/haskell.nix#2573 ·
-
docs
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 85/100
-
needs triage type: bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100