On Thu, Oct 06, 2016 at 12:57:43PM +0100, Stuart Henderson wrote: > On 2016/10/06 13:23, David Coppa wrote: > > On Thu, Oct 6, 2016 at 12:50 PM, Andreas Kusalananda Kähäri > > <andreas.kah...@nbis.se> wrote: > > > Hi, > > > > > > Let me know if this should be on ports rather than here. > > > > > > I'm following OpenBSD current on amd64, updating the system a couple of > > > times a week, and I'm using valgrind from ports to check a C program for > > > memory leaks. However, since recently (sorry, can't specify closer, > > > within the last couple of months) I get a W^X violation when I try it. > > > > devel/valgrind is missing the USE_WXNEEDED=Yes marker. > > valgrind works by preloading an .so file and wrapping library functions > to override with its own versions. > > You will at least need to link the program under test with -Wl,-z,wxneeded > but you might need to do more than this. >
Adding USE_WXNEEDED=Yes to the valgrind port cuts down the error from valgrind to just valgrind: mmap(0x108000, 4550656) failed in UME with error 12 (Cannot allocate memory). ... and a notification of a W^X violation from the kernel as before. Adding "-Wl,-z,wxneeded" when linking my application makes no difference. I'm still trying to run it under /home with wxneeded added to the mount flags as before. Is there anything else I could try? -- Andreas Kusalananda Kähäri Bioinformatics Developer NBIS, Uppsala University http://www.nbis.se/
signature.asc
Description: PGP signature