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

Handle segfaults

Aperta
#383 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
45/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
python
Ambito
testing-qa

Direzione di ricerca

Inizia in mutmut/main.py, in collect_stat, dove il codice di uscita per segfault attualmente causa un KeyError durante mutmut run. Traccia il modo in cui vengono mappati gli stati di uscita dei test e analizza il percorso di reporting esistente. Il lavoro è completato quando un segfault di processo viene gestito senza questo traceback e riportato secondo la classificazione prevista dall’issue.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Currently, if a mutant causes the Python process to segfault during the test run, mutmut run fails with:

…
File "…/mutmut/__main__.py", line 525, in collect_stat
  r[status_by_exit_code[v].replace(' ', '_')] += 1
    ~~~~~~~~~~~~~~~~~~~^^^
KeyError: -11

If the code under test is a binding to C code, the mutant might have weakened a check that should have prevented passing invalid data to C code. These mutants should therefore probably be considered killed.

If the mutated code is not code that sanitizes data before passing it to C, it would be nice if there was an option to show them separately such that the segfault can be isolated and reported. However, as mutmut doesn’t seem to have a way to distinguish “wanted” and “unwanted” errors, it would be reasonable to report these mutants as killed unconditionally. If mutmut had such distinction, it would be useful to mark code (e.g. at file granularity) as “segfault-preventing” code. If mutating such code causes a segfault, the mutant would be considered as killed, otherwise the segfault would be marked as an “unwanted” error.

Lingua principale
Python
Stelle
1.5k
Fork
179
Merge medio
1g 18h
PR unite (30g)
6

Preparare l'ambiente

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 boxed/mutmut

Tutte le issue di boxed/mutmut

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.