[Top][All Lists]

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

[bug #15329] exec doesn't like zip'ed binaries

From: Andrew Resch
Subject: [bug #15329] exec doesn't like zip'ed binaries
Date: Sat, 21 Oct 2006 21:57:31 +0000
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv: Gecko/20060916 Firefox/

Follow-up Comment #1, bug #15329 (project hurd):

The function vm_write() in load_section() requires that the data contents be
in page-aligned memory, but zipdata is allocated by open_memstream() which
does not allocate page-aligned memory.  In check_{gzip(),bzip2()}, we need to
allocate page-aligned memory space with valloc(), memcpy zipdata into it and
then point e->file_data to that.

For some reason, exec requires that e->map_buffer has the data mmap'd, even
when we have the data in e->file_data.  It will not work if we do not set

All this needs to be done after the finish() call in check_{gzip(),bzip2()}
or they data in e->file_data and e->map_buffer will be freed.

Also, in finish() we need to set e->file_data = NULL after free()ing the data
so that we do not attempt to free it again on a subsequent call to finish().


Reply to this item at:


  Message sent via/by Savannah

reply via email to

[Prev in Thread] Current Thread [Next in Thread]