sort -u: fix a thread-race pointer corruption bug
authorPaul Eggert <eggert@cs.ucla.edu>
Tue, 30 Nov 2010 21:30:12 +0000 (22:30 +0100)
committerJim Meyering <meyering@redhat.com>
Wed, 1 Dec 2010 06:13:06 +0000 (07:13 +0100)
commit3afda5f0076beca786ecbe90875828eb6988a964
treea14bb414b71228d8e12f78886cb31d40aff35255
parent43d1112d01c0251076b5ec61605e45b101ab3e12
sort -u: fix a thread-race pointer corruption bug

* src/sort.c (write_unique): Save the entire "struct line", not
just a pointer to one.  Otherwise, with a multi-thread run,
sometimes, with some inputs, fillbuf would would win a race
and clobber a "saved->text" pointer in one thread just before
it was dereferenced in a comparison in another thread.
* NEWS (Bug fixes): Mention it.
NEWS
src/sort.c