|
From: Tom H. <to...@co...> - 2005-11-17 12:22:21
|
In message <172...@ca...>
Paul Mackerras <pa...@sa...> wrote:
> Julian Seward writes:
>
>> However .. the clinchers are that (1) even on x86, the data seg is
>> rwx natively, at least according to cat /proc/self/maps, and (2)
>> having a non-executable data seg would kill any program which tried
>> to create code in the data seg and then run it. So I'd say it should
>> be rwx on all platforms.
>
> Forgive me if I missed something at the beginning of this discussion,
> but why can't Valgrind just use the permissions as set by the kernel
> and listed in /proc/self/maps?
Well it would be a bit of a pain to have to go wading through that
just to find out what permissions the original brk segment had. I'm
not even sure it will be there if you haven't called brk to allocate
some memory from it which valgrind probably won't have done.
Tom
--
Tom Hughes (to...@co...)
http://www.compton.nu/
|