that the memory was not set to executable. This caused some horrible
segfaults that due to lack of hardware i've been unable to track down
for months.
Conveniently, there was already a memory allocator that uses mmap to
create executable memory, #ifdef linux. Make it usable for us too.
Problem solved!
Thanks for todd@ for helping me debug, and deraadt@ for noticing the
allocator.
Makes SiS work with dri, probaby solves a bunch of other people too.
ok matthieu@ (who has sent this upstream).
[965] Fix potential segfaults from bad realloc.
C has no order of evaluation restrictions on function arguments, so we
attempted to realloc from new-size to new-size.