[Gc] Re: Valgrind patch
theseaisinhere at gmail.com
Wed Mar 10 18:42:36 PST 2010
This new patch uses GC_get_stack_base when linux threads is available.
So on Linux builds, GC_linux_stack_base now prefers GC_get_stack_base
-> __libc_stack_end -> /proc/self/stat.
2010/3/9 Ludovic Courtès <ludo at gnu.org>:
> Ivan Maidanski <ivmai at mail.ru> writes:
>> The patch suggests using for GC_linux_stack_base() the same code as in GC_get_stack_base(),
>> so the simpler fix would be just define GC_get_main_stack_base() to use GC_get_stack_base() for valgreed case.
>> And, my question is: why are we not using pthread_attr_getstack() for GC_get_main_stack_base() on Linux at present?
> No idea. I think it would probably make sense to use the same code on
> all systems based on the GNU libc (‘__libc_stack_end’ & co.), rather
> than using non-portable code for Linux-based systems. It may even be
> that ‘pthread_attr_getstack ()’ can just as well be used on GNU systems
> as you suggest.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 718 bytes
Desc: not available
Url : http://napali.hpl.hp.com/pipermail/gc/attachments/20100310/06d9e116/valgrind2.obj
More information about the Gc