Hi again,

I should’ve read this message before.  Thanks for the explanation.

No Itisnt <theseaisinh...@gmail.com> writes:

> The attached program grabs the stack address from the kernel, glibc,
> and by taking the address of a stack object, then prints the
> difference. When run normally, the differences are minimal, but when
> run under valgrind, there is a giant difference between the base of
> the actual program and the base given by the kernel.
>
> Ideally, this would be patched in libgc,

Indeed.  Now it’s curious why libgc would need to mess up with /proc
since it’s Linux-specific, inefficient (open(2), read(2), parse, etc.),
and fragile (what if /proc isn’t mounted?  what if the format of ‘maps’
changes?).

libgc should probably just use ‘__libc_stack_end’ et al. on all GNU
variants, including GNU/Linux.

Thanks,
Ludo’.



Reply via email to