[Bug 258212] net-im/telegram-desktop: stop reason = signal SIGSEGV

From: <bugzilla-noreply_at_freebsd.org>
Date: Wed, 08 Sep 2021 04:04:26 UTC

--- Comment #3 from Henry Hu <henry.hu.sh@gmail.com> ---
I'm able to reproduce this with a simple program:

#include <iconv.h>
#include <pthread.h>
#include <locale.h>

void* iconv_thread(void* arg) {
    iconv_open("UTF-8", "UTF-8");
    return NULL;

void* locale_thread(void* arg) {
    setlocale(LC_ALL, "en_US.UTF-8");
    return NULL;

int main() {
    pthread_t t1, t2;
    pthread_create(&t1, NULL, iconv_thread, NULL);
    pthread_create(&t2, NULL, locale_thread, NULL);
    pthread_join(t1, NULL);
    pthread_join(t2, NULL);

Seems to be an issue in concurrent calls to iconv_open() and setlocale().

You are receiving this mail because:
You are the assignee for the bug.