Lauri Leukkunen wrote:
> Attached patch fixes the linux-user path mangling code for use with
> real target root filesystems that have nasty symlinks and lots of
> files. The old code is terribly slow and can easily end up going
> through the entire host system /usr hierarchy in a recursive loop.
>
> Compared to the previous version of this patch, fixes an issue with
> attempting to free() a pointer returned by GNU basename().
I gave it a try, and found:
- It loses the path caching (which should be done incrementally to
avoid the slowness you observe)
- It misses to do error handling on malloc() returns
- It is broken, an emulated "/bin/ls /.." shows it ascends above
the root.
Thiemo