PATCH: Add memory barrier to malloc

Richard Henderson rth@twiddle.net
Wed May 7 17:28:00 GMT 2003


On Tue, May 06, 2003 at 03:43:19PM -0000, Wolfram Gloger wrote:
> > > >     H.J. Lu>    a->next = main_arena.next;
> > > >     H.J. Lu> +  atomic_write_barrier ();
> > > >     H.J. Lu>    main_arena.next = a;
> 
> If the patch above makes a difference it just shows that read access
> to a pointer in memory isn't atomic on ia64.

No, the problem that this shows is that if a->next isn't committed to
memory, that a reader can main_arena.next == a, but an trash in a->next.


r~



More information about the Libc-alpha mailing list