Current-Users archive

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

Re: Script command under NetBSD-current



On Wed, 16 Jun 2021, Taylor R Campbell wrote:

This indicates a bug in the script(1) program -- it calls exit() in a
signal handler, but exit() is not async-signal-safe.


Ah nuts... I should've noticed that.

The corresponding membar_enter in _rtld_shared_enter at the beginning
doesn't make sense and should be removed.  In particular, the order
generally needs to be something like:

mumblefrotz_enter:
	atomic_r/m/w(lock stuff);
	membar_enter();

	body of critical section;

mumblefrotz_exit:
	membar_exit();
	atomic_r/m/w(lock stuff);

Putting another membar_enter _before_ the atomic_r/m/w(lock stuff) in
mumblefrotz_enter doesn't really do anything.


Thanks for this. I'll keep it in mind.

-RVP


Home | Main Index | Thread Index | Old Index