andlabs / andlabs/libui

Add assertions that libui functions are not called on the wrong threads

Ouverte
#324 1 commentaire 0 réactions 0 personnes assignées Voir sur GitHub
Langage dominant
C
Étoiles
10.9k
Forks
612
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

If a (buggy by definition) user program calls a libui function on a thread from which it is not safe to do so, libui should call `userbug` to kill the program with a useful error message. This is much better than random memory corruption in C code due to race conditions. The latter is almost impossible to debug, especially when the memory corruption happens in closed source libraries that cannot be instrumented with tools such as ThreadSanitizer.

The overhead from these checks should be small enough that they can always be enabled.

Guide de contribution

Ouvrir le guide de contribution

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.