Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

setUnicodeLocale is dangerous and might lead to segmentation faults

Aperta
#96 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

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

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

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di snapframework/snap-server

Tutte le issue di snapframework/snap-server

Issue simili

Altre issue su Haskell

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.