Independent of executable or doas/su, valgrind fails with the following error message for me on -current:$valgrind calvalgrind: mmap(0x108000, 4210688) failed in UME with error 12 (Cannot allocate memory).dmesg shows mmap W^X violation.I'm not sure how to best find a solution to this. Valgrind is on /usr/local/ and wxallowed is set for it. How to reproduce:Run any executable with valgrind OpenBSD version:Snapshot from 07-01-16
$mount /dev/sd0a on / type ffs (local, noatime, softdep) /dev/sd0k on /home type ffs (local, noatime, nodev, nosuid, softdep) /dev/sd0d on /tmp type ffs (local, noatime, nodev, nosuid, softdep) /dev/sd0f on /usr type ffs (local, noatime, nodev, softdep) /dev/sd0g on /usr/X11R6 type ffs (local, noatime, nodev, softdep) /dev/sd0h on /usr/local type ffs (local, noatime, nodev, wxallowed, softdep) /dev/sd0j on /usr/obj type ffs (local, noatime, nodev, nosuid, softdep) /dev/sd0i on /usr/src type ffs (local, noatime, nodev, nosuid, softdep) /dev/sd0e on /var type ffs (local, noatime, nodev, nosuid, softdep) $dmesg OpenBSD 6.0-beta (GENERIC.MP) #2244: Fri Jul 1 18:27:00 MDT 2016 dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP real mem = 7457574912 (7112MB) avail mem = 7227015168 (6892MB) mpath0 at root scsibus0 at mpath0: 256 targets mainbus0 at root bios0 at mainbus0: SMBIOS rev. 2.8 @ 0xecd20 (55 entries) bios0: vendor American Megatrends Inc. version "V8.1" date 04/15/2015 bios0: MSI MS-7721 acpi0 at bios0: rev 2 acpi0: sleep states S0 S3 S4 S5 acpi0: tables DSDT FACP APIC FPDT FIDT MCFG HPET UEFI IVRS SSDT SSDT CRAT SSDT SSDT SSDT acpi0: wakeup devices SBAZ(S4) PS2K(S3) PS2M(S3) ECIR(S4) P0PC(S4) OHC1(S4) EHC1(S4) OHC2(S4) EHC2(S4) OHC3(S4) EHC3(S4) OHC4(S4) PE20(S4) PE21(S4) PE23(S4) PB21(S4) [...] acpitimer0 at acpi0: 3579545 Hz, 32 bits acpimadt0 at acpi0 addr 0xfee00000: PC-AT compat cpu0 at mainbus0: apid 16 (boot processor) cpu0: AMD A8-7600 Radeon R7, 10 Compute Cores 4C+6G, 3096.53 MHz cpu0: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,PCLMUL,MWAIT,SSSE3,FMA3,CX16,SSE4.1,SSE4.2,POPCNT,AES,XSAVE,AVX,F16C,NXE,MMXX,FFXSR,PAGE1GB,LONG,LAHF,CMPLEG,SVM,EAPICSP,AMCR8,ABM,SSE4A,MASSE,3DNOWP,OSVW,IBS,XOP,SKINIT,WDT,FMA4,NODEID,TBM,TOPEXT,ITSC,FSGSBASE,BMI1 cpu0: 96KB 64b/line 3-way I-cache, 16KB 64b/line 4-way D-cache, 2MB 64b/line 16-way L2 cache cpu0: ITLB 48 4KB entries fully associative, 24 4MB entries fully associative cpu0: DTLB 64 4KB entries fully associative, 64 4MB entries fully associative cpu0: smt 0, core 0, package 0 mtrr: Pentium Pro MTRR support, 8 var ranges, 88 fixed ranges cpu0: apic clock running at 99MHz cpu0: mwait min=64, max=64, IBE cpu1 at mainbus0: apid 17 (application processor) cpu1: AMD A8-7600 Radeon R7, 10 Compute Cores 4C+6G, 3094.23 MHz cpu1: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,PCLMUL,MWAIT,SSSE3,FMA3,CX16,SSE4.1,SSE4.2,POPCNT,AES,XSAVE,AVX,F16C,NXE,MMXX,FFXSR,PAGE1GB,LONG,LAHF,CMPLEG,SVM,EAPICSP,AMCR8,ABM,SSE4A,MASSE,3DNOWP,OSVW,IBS,XOP,SKINIT,WDT,FMA4,NODEID,TBM,TOPEXT,ITSC,FSGSBASE,BMI1 cpu1: 96KB 64b/line 3-way I-cache, 16KB 64b/line 4-way D-cache, 2MB 64b/line 16-way L2 cache cpu1: ITLB 48 4KB entries fully associative, 24 4MB entries fully associative cpu1: DTLB 64 4KB entries fully associative, 64 4MB entries fully associative cpu1: smt 0, core 1, package 0 cpu2 at mainbus0: apid 18 (application processor) cpu2: AMD A8-7600 Radeon R7, 10 Compute Cores 4C+6G, 3094.22 MHz cpu2: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,PCLMUL,MWAIT,SSSE3,FMA3,CX16,SSE4.1,SSE4.2,POPCNT,AES,XSAVE,AVX,F16C,NXE,MMXX,FFXSR,PAGE1GB,LONG,LAHF,CMPLEG,SVM,EAPICSP,AMCR8,ABM,SSE4A,MASSE,3DNOWP,OSVW,IBS,XOP,SKINIT,WDT,FMA4,NODEID,TBM,TOPEXT,ITSC,FSGSBASE,BMI1 cpu2: 96KB 64b/line 3-way I-cache, 16KB 64b/line 4-way D-cache, 2MB 64b/line 16-way L2 cache cpu2: ITLB 48 4KB entries fully associative, 24 4MB entries fully associative cpu2: DTLB 64 4KB entries fully associative, 64 4MB entries fully associative cpu2: smt 0, core 2, package 0 cpu3 at mainbus0: apid 19 (application processor) cpu3: AMD A8-7600 Radeon R7, 10 Compute Cores 4C+6G, 3094.22 MHz cpu3: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,PCLMUL,MWAIT,SSSE3,FMA3,CX16,SSE4.1,SSE4.2,POPCNT,AES,XSAVE,AVX,F16C,NXE,MMXX,FFXSR,PAGE1GB,LONG,LAHF,CMPLEG,SVM,EAPICSP,AMCR8,ABM,SSE4A,MASSE,3DNOWP,OSVW,IBS,XOP,SKINIT,WDT,FMA4,NODEID,TBM,TOPEXT,ITSC,FSGSBASE,BMI1 cpu3: 96KB 64b/line 3-way I-cache, 16KB 64b/line 4-way D-cache, 2MB 64b/line 16-way L2 cache cpu3: ITLB 48 4KB entries fully associative, 24 4MB entries fully associative cpu3: DTLB 64 4KB entries fully associative, 64 4MB entries fully associative cpu3: smt 0, core 3, package 0 ioapic0 at mainbus0: apid 0 pa 0xfec00000, version 21, 24 pins ioapic1 at mainbus0: apid 1 pa 0xfec01000, version 21, 32 pins acpimcfg0 at acpi0 addr 0xe0000000, bus 0-255 acpihpet0 at acpi0: 14318180 Hz acpiprt0 at acpi0: bus 0 (PCI0) acpiprt1 at acpi0: bus 3 (P0PC) acpiprt2 at acpi0: bus -1 (PE20) acpiprt3 at acpi0: bus -1 (PE21) acpiprt4 at acpi0: bus -1 (PE23) acpiprt5 at acpi0: bus 1 (PB21) acpiprt6 at acpi0: bus -1 (PB22) acpiprt7 at acpi0: bus 2 (PB31) acpiprt8 at acpi0: bus -1 (PB32) acpiprt9 at acpi0: bus -1 (PB33) acpiprt10 at acpi0: bus -1 (PB34) acpiprt11 at acpi0: bus -1 (PE22) acpicpu0 at acpi0: C2(0@400 io@0x1771), C1(@1 halt!), PSS acpicpu1 at acpi0: C2(0@400 io@0x1771), C1(@1 halt!), PSS acpicpu2 at acpi0: C2(0@400 io@0x1771), C1(@1 halt!), PSS acpicpu3 at acpi0: C2(0@400 io@0x1771), C1(@1 halt!), PSS "PNP0501" at acpi0 not configured acpibtn0 at acpi0: PWRB "pnp0c14" at acpi0 not configured acpivideo0 at acpi0: VGA_ acpivideo1 at acpi0: VGA_ acpivideo2 at acpi0: VGA_ cpu0: 3096 MHz: speeds: 3100 2800 2400 1900 1400 MHz pci0 at mainbus0 bus 0 pchb0 at pci0 dev 0 function 0 vendor "AMD", unknown product 0x1422 rev 0x00 vendor "AMD", unknown product 0x1423 (class system unknown subclass 0x06, rev 0x00) at pci0 dev 0 function 2 not configured vendor "ATI", unknown product 0x1313 (class display subclass VGA, rev 0x00) at pci0 dev 1 function 0 not configured azalia0 at pci0 dev 1 function 1 vendor "ATI", unknown product 0x1308 rev 0x00: msi azalia0: no supported codecs pchb1 at pci0 dev 2 function 0 vendor "AMD", unknown product 0x1424 rev 0x00 ppb0 at pci0 dev 2 function 1 vendor "AMD", unknown product 0x1425 rev 0x00: msi pci1 at ppb0 bus 1 radeondrm0 at pci1 dev 0 function 0 "ATI Radeon HD 6850" rev 0x00 drm0 at radeondrm0 radeondrm0: msi azalia1 at pci1 dev 0 function 1 vendor "ATI", unknown product 0xaa88 rev 0x00: msi azalia1: no supported codecs pchb2 at pci0 dev 3 function 0 vendor "AMD", unknown product 0x1424 rev 0x00 ppb1 at pci0 dev 3 function 1 vendor "AMD", unknown product 0x1426 rev 0x00: msi pci2 at ppb1 bus 2 re0 at pci2 dev 0 function 0 "Realtek 8168" rev 0x0c: RTL8168G/8111G (0x4c00), msi, address d8:cb:8a:78:d0:1f rgephy0 at re0 phy 7: RTL8251 PHY, rev. 0 pchb3 at pci0 dev 4 function 0 vendor "AMD", unknown product 0x1424 rev 0x00 xhci0 at pci0 dev 16 function 0 "AMD Bolton xHCI" rev 0x09: msi usb0 at xhci0: USB revision 3.0 uhub0 at usb0 "AMD xHCI root hub" rev 3.00/1.00 addr 1 ahci0 at pci0 dev 17 function 0 "AMD Hudson-2 SATA" rev 0x40: msi, AHCI 1.3 ahci0: port 2: 6.0Gb/s ahci0: port 3: 6.0Gb/s scsibus1 at ahci0: 32 targets sd0 at scsibus1 targ 2 lun 0: <ATA, KINGSTON SV300S3, 600A> SCSI3 0/direct fixed naa.50026b7851046be1 sd0: 228936MB, 512 bytes/sector, 468862128 sectors, thin sd1 at scsibus1 targ 3 lun 0: <ATA, Hitachi HUA72302, MK7O> SCSI3 0/direct fixed naa.5000cca225e1fc2a sd1: 1907729MB, 512 bytes/sector, 3907029168 sectors ohci0 at pci0 dev 18 function 0 "AMD Hudson-2 USB" rev 0x11: apic 0 int 18, version 1.0, legacy support ehci0 at pci0 dev 18 function 2 "AMD Hudson-2 USB2" rev 0x11: apic 0 int 17 usb1 at ehci0: USB revision 2.0 uhub1 at usb1 "AMD EHCI root hub" rev 2.00/1.00 addr 1 ohci1 at pci0 dev 19 function 0 "AMD Hudson-2 USB" rev 0x11: apic 0 int 18, version 1.0, legacy support ehci1 at pci0 dev 19 function 2 "AMD Hudson-2 USB2" rev 0x11: apic 0 int 17 usb2 at ehci1: USB revision 2.0 uhub2 at usb2 "AMD EHCI root hub" rev 2.00/1.00 addr 1 piixpm0 at pci0 dev 20 function 0 "AMD Hudson-2 SMBus" rev 0x16: polling iic0 at piixpm0 spdmem0 at iic0 addr 0x52: 4GB DDR3 SDRAM PC3-12800 spdmem1 at iic0 addr 0x53: 4GB DDR3 SDRAM PC3-12800 azalia2 at pci0 dev 20 function 2 "AMD Hudson-2 HD Audio" rev 0x01: apic 0 int 16 azalia2: codecs: Realtek/0x0887 audio0 at azalia2 pcib0 at pci0 dev 20 function 3 "AMD Hudson-2 LPC" rev 0x11 ppb2 at pci0 dev 20 function 4 "AMD Hudson-2 PCI" rev 0x40 pci3 at ppb2 bus 3 ohci2 at pci0 dev 20 function 5 "AMD Hudson-2 USB" rev 0x11: apic 0 int 18, version 1.0, legacy support pchb4 at pci0 dev 24 function 0 vendor "AMD", unknown product 0x141a rev 0x00 pchb5 at pci0 dev 24 function 1 vendor "AMD", unknown product 0x141b rev 0x00 pchb6 at pci0 dev 24 function 2 vendor "AMD", unknown product 0x141c rev 0x00 pchb7 at pci0 dev 24 function 3 vendor "AMD", unknown product 0x141d rev 0x00 pchb8 at pci0 dev 24 function 4 vendor "AMD", unknown product 0x141e rev 0x00 pchb9 at pci0 dev 24 function 5 vendor "AMD", unknown product 0x141f rev 0x00 usb3 at ohci0: USB revision 1.0 uhub3 at usb3 "AMD OHCI root hub" rev 1.00/1.00 addr 1 usb4 at ohci1: USB revision 1.0 uhub4 at usb4 "AMD OHCI root hub" rev 1.00/1.00 addr 1 isa0 at pcib0 isadma0 at isa0 com0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo com0: probed fifo depth: 15 bytes pckbc0 at isa0 port 0x60/5 irq 1 irq 12 pckbd0 at pckbc0 (kbd slot) wskbd0 at pckbd0: console keyboard pcppi0 at isa0 port 0x61 spkr0 at pcppi0 usb5 at ohci2: USB revision 1.0 uhub5 at usb5 "AMD OHCI root hub" rev 1.00/1.00 addr 1 umass0 at uhub0 port 2 configuration 1 interface 0 "Western Digital My Book 1230" rev 3.00/10.65 addr 2 umass0: using SCSI over Bulk-Only scsibus2 at umass0: 2 targets, initiator 0 sd2 at scsibus2 targ 1 lun 0: <WD, My Book 1230, 1065> SCSI4 0/direct fixed sd2: 2861556MB, 4096 bytes/sector, 732558336 sectors ses0 at scsibus2 targ 1 lun 1: <WD, SES Device, 1065> SCSI4 13/enclosure services fixed ses0: unable to read enclosure configuration umass1 at uhub0 port 3 configuration 1 interface 0 "Iomega Iomega Select HDD" rev 2.00/1.00 addr 3 umass1: using SCSI over Bulk-Only scsibus3 at umass1: 2 targets, initiator 0 sd3 at scsibus3 targ 1 lun 0: <ST950032, 5AS, > SCSI2 0/direct fixed serial.059b047a5E61ADFFFFFF sd3: 476940MB, 512 bytes/sector, 976773168 sectors uhidev0 at uhub4 port 2 configuration 1 interface 0 "vendor 0x2222 Macally USB Keyboard" rev 2.00/1.60 addr 2 uhidev0: iclass 3/1 ukbd0 at uhidev0: 8 variable keys, 6 key codes wskbd1 at ukbd0 mux 1 uhidev1 at uhub4 port 2 configuration 1 interface 1 "vendor 0x2222 Macally USB Keyboard" rev 2.00/1.60 addr 2 uhidev1: iclass 3/0, 2 report ids uhid0 at uhidev1 reportid 1: input=2, output=0, feature=0 uhid1 at uhidev1 reportid 2: input=1, output=0, feature=0 uhidev2 at uhub4 port 3 configuration 1 interface 0 "Logitech USB Laser Mouse" rev 2.00/31.00 addr 3 uhidev2: iclass 3/1 ums0 at uhidev2: 8 buttons, Z and W dir wsmouse0 at ums0 mux 0 vscsi0 at root scsibus4 at vscsi0: 256 targets softraid0 at root scsibus5 at softraid0: 256 targets root on sd0a (87d2af21f44a3394.a) swap on sd0b dump on sd0b radeondrm0: 1920x1080 wsdisplay0 at radeondrm0 mux 1: console (std, vt100 emulation), using wskbd0 wskbd1: connecting to wsdisplay0 wsdisplay0: screen 1-5 added (std, vt100 emulation) soffice.bin(97616): mprotect W^X violation memcheck-amd64-o(47811): mmap W^X violation memcheck-amd64-o(12988): mmap W^X violation memcheck-amd64-o(27914): mmap W^X violation memcheck-amd64-o(14918): mmap W^X violation memcheck-amd64-o(90020): mmap W^X violation memcheck-amd64-o(55685): mmap W^X violation memcheck-amd64-o(58565): mmap W^X violation memcheck-amd64-o(49416): mmap W^X violation