|
From: Julian S. <js...@ac...> - 2005-11-16 23:18:12
|
> In that case should we make this code: > > /* We make the data segment (heap) executable because LinuxThreads on > ppc32 creates trampolines in this area. */ > sres = VG_(am_mmap_anon_fixed_client)( > anon_start, > anon_size, > VKI_PROT_READ|VKI_PROT_WRITE|VKI_PROT_EXEC > ); > > only set EXEC for ppc32, using a "#if defined(ppc32)"? Well, the thing is, I'm not sure why it didn't screw up LinuxThreads on x86 (I tried that too). It's kind-of hard to argue that ppc32 and x86 LinuxThreads have the stack of their manager thread in totally different places. I did notice that the order in which signals were delivered was different running the same ultra-trivial threaded test on both x86 and ppc32 running SuSE10 with LD_ASSUME_KERNEL=2.2.19. 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. J |