http://xmlsoft.org/html/libxml-parser.html#xmlCleanupParser
parser: the core parser module
xmlParserInputPtr resolveEntitySAXFunc (void * ctx, const xmlChar * publicId, const xmlChar * systemId) Callback: The entity loader, to control the loading of external entities, the application can either: - override this resolveEntity() callback in the SA
gnome.pages.gitlab.gnome.org
xmlCleanupParser 사용시에는 항상 주의를 기울여야 합니다.
결론부터 말하자면, 위의 메서드는 Race condition이 존재하지 않는 영영에서 호출을 하게되면 문제가 발생한다.
Embeded에서는 호출을 하지않고 마무리하는 것도 좋은 방법이 될 수 있다.
xmlCleanupParser의 소스내에 global memory를 delete하는 부분이 존재해서 crash의 위험성이 항상 존재함. ^^;
(OpenSource를 download하면 thread.c파일안에 다음과같은 부분임)
void xmlCleanupThreads(void)
{
...
pthread_key_delete(golbalkey); (요부분이 위험!!)
...
}