Hi,

I've met this bug again (it was reported almost 7 years ago in debian
bts as #46859 and periodically noticed again), and a quick look at the
code upsets me:

  assert (! __spin_lock_locked (&ss->critical_section_lock));
  __spin_lock (&ss->critical_section_lock);

Why should one check that a spinlock is free before taking it?? Here the
purpose is to cancel _another_ thread, so it _can_ happen that the lock
be taken any time...  The bug report says it was already discussed on
bug-hurd, but archives of that time aren't available...  Roland said he
would not touch it until a "massive overhaul"... which never happened.

There are several such strange assertions in hurd/hurdexec.c and
sysdeps/mach/hurd/{spawni.c,jmp-unwind.c}

Shouldn't at least these assertion just be dropped?

Samuel


_______________________________________________
Bug-hurd mailing list
Bug-hurd@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-hurd

Reply via email to