[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Can we go GTK-only?

From: Perry E. Metzger
Subject: Re: Can we go GTK-only?
Date: Tue, 1 Nov 2016 15:35:33 -0400

On Tue, 01 Nov 2016 19:46:30 +0200 Eli Zaretskii <address@hidden> wrote:
> > The standard has required that malloc be thread safe as long as
> > pthreads has been around IIRC.  
> Requiring is one thing; being able to implement it and weed out the
> bugs is quite another.

A bug in something as basic as malloc/free thread handling would
start causing ported C programs to fail almost immediately. The
operating system code would never get out of testing in such a state
let alone be released to users. malloc is called far too often.

I would not be shocked if some rare latent bugs existed in the average
threaded libc, after all, bugs are common in software, and
multithreading is particularly hard.

However, I would be shocked if a single threaded libc did not handle
this particular case in as bug free a manner as the rest of malloc
itself. If one is willing to accept the use of the system malloc in
the non-threaded case on the premise that it is reasonably bug free,
then one should likely accept that it handles thread safety as well.

Perry E. Metzger                address@hidden

reply via email to

[Prev in Thread] Current Thread [Next in Thread]