Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Mon, 26 Oct 2020 15:52:46 -0400
From: Rich Felker <dalias@...c.org>
To: musl@...ts.openwall.com
Subject: Re: Status report and MT fork

On Mon, Oct 26, 2020 at 03:44:51PM -0300, Érico Nogueira wrote:
> On Sun Oct 25, 2020 at 8:29 PM -03, Rich Felker wrote:
> > > +	for (i=0; i<qpos; i++) if (queue[i]->ctor_visitor->tid < 0) {
> > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> >
> > Invalid access as-is, should be queue[i]->ctor_visitor && ...
> >
> > > +		error("State of %s is inconsistent due to multithreaded fork\n",
> > > +			queue[i]->name);
> > > +		free(queue);
> > > +		if (runtime) longjmp(*rtld_fail, 1);
> > > +	}
> > >  
> > >  	return queue;
> > >  }
> 
> As a warning, don't install the resulting libc.so on your system without
> the above fix! It segfaulted even with simple applications here.

Yep, sorry about that. I'd rebased out an older version with
queue[i]->ctor_visitor being the tid itself rather than the pthread_t,
and hadn't retested it since adding the ->tid.

> Re. the patches, I am now able to import an image into gscan2pdf (a Perl
> GTK application) - though it required building Perl with a bigger thread
> stack size. With musl 1.2.1 it simply hung on a futex syscall.

Great to hear! Was it "working" in earlier musl though? The crash (as
discussed on irc) was clearly a stack overflow but it seems odd that
it would be newly introduced, unless it was just really borderline on
fitting before.

Rich

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.