On Tue, 13 Feb 2018, Chet Ramey wrote:
> > It would be nice if bash's malloc implementation could be fixed to also
> > work under qemu-user.
> Does sbrk(2) work in a PIE-enabled environment?

Note that a bash binary compiled with PIE works fine for normal usage
with a current Linux kernel. Apparently it was causing troubles with
older Linux kernels, see 

But with current kernels it works fine. The problem only happens
under qemu-user.

>From what I understood the memory layout of a PIE-compiled binary is
different but sbrk() still works the same. Maybe some assumption that you
are doing about the memory layout are not holding true however.

While trying to learn more about this I found this URL

I'm sorry but I don't know much more than that on this topic. Maybe some
qemu developers should be involved in the discussion.

Raphaël Hertzog ◈ Debian Developer

Support Debian LTS: https://www.freexian.com/services/debian-lts.html
Learn to master Debian: https://debian-handbook.info/get/

Reply via email to