[ moved to ports@ ] On 2017-05-25, Peter Ezetta <peter.eze...@zonarsystems.com> wrote: > Hello Misc, > > I have been trying to get Valgrind to run on OpenBSD 6.1-release, with > all errata applied via syspatch(8), and I am having no luck. When > executing Valgrind against any binary (or no binary at all), it claims to > run out of memory and dumps a W^X violation error into the dmesg > output. > > There have been several other mailing list posts about this issue over > the last few months, but nothing seems to have come of it: > > http://openbsd-archive.7691.n7.nabble.com/valgrind-error-W-X-violation-td299828.html > http://openbsd-archive.7691.n7.nabble.com/W-X-issues-running-valgrind-td305977.html > > I have tried reaching out to the package maintainer listed in pkg_info, > but haven’t heard anything back yet. Is there anything that I can do to > assist in debugging and fixing this issue? If it would be of any use to > anyone, I have ktrace dumps, but the output was a bit verbose for an > already long email. I can forward along if it would be helpful. > > It appears that the next step may be to update my system to follow current, > grab a copy of the ports tree, and attempt to build the package with > -Wl,-z,wxneeded. Am I on the right track here?
I just committed a diff adding USE_WXNEEDED=Yes and the patch from https://marc.info/?l=openbsd-ports&m=149541633922860&w=2 which removes the most major breakage. (It will show up in package snaps in a few days, if you want to build it yourself you must use a port build directory on a "wxallowed" filesystem, e.g. you could do something like "make WRKOBJDIR=/usr/local/pobj package" Also note (especially if you try it with programs from OpenBSD base), if a program uses pledge(2) this may interfere with valgrind. Caveat emptor: since it has been broken for ~ a year, I think it's safe to say that this port is not really maintained any more.