Test failure: cannot run dumped images on OpenBSD 6.0

Bug #1621919 reported by pipping
This bug affects 1 person
Affects Status Importance Assigned to Milestone

Bug Description

OpenBSD 6.0 made W^X the default for all partitions except the one containing /usr/local, see also




Consequently, anything that violates W^X can still be run if it resides in /usr/local but not generally from other partitions. In particular, this affects sbcl executables dumped and run as a part of test-program, whenever the partition we're dumping to has W^X enabled (which will pretty much always be the case starting with OpenBSD 6.0). This issue cannot be worked around by dumping and running in /tmp or any such thing.

If we can reliably detect OpenBSD >= 6.0 as the host system, the test can be disabled there.

pipping (pipping)
description: updated
Revision history for this message
Faré (fahree) wrote :

NB: Only someone who uses OpenBSD can write and test a patch, so that'll be you.

For extra credits, can you check whether you're being compiled in /usr/local and/or whether your directory has W^X restrictions?

Revision history for this message
pipping (pipping) wrote :

Right, I did not expect anyone other than myself to come up with a patch but mostly meant to make this issue public and known (that is, findable through everyone's favourite search engine).

This issue affects SBCL.
It may or may not affect Clisp. Clisp on OpenBSD is so old that it has other open bugs that lead to test failures.
This issue does not affect ECL (which passes all tests).

The best way I've found so far to determine mount options is through this script:


disk=$(df -P $1 | awk 'NR == 2 { print $1 }');
mount_options=$(mount | awk -v disk=$disk '$1 == disk { print }' | awk -F '[()]' '{print $(NF-1)}')

echo ${mount_options}

which works as follows:
# ./mount_options.sh .
# ./mount_options.sh /usr/local/
local, nodev, wxallowed

`uname -r` gives us the version info we need:
# uname -r

SBCL fortunately has :openbsd in *features* that we can test with (clisp wouldn't).

Revision history for this message
Faré (fahree) wrote :

I recommend Lisp scripting with run-program rather than invoking a shell then processing with awk.

Revision history for this message
Faré (fahree) wrote :

I hadn't realized you already had a fix. Merged.


Changed in asdf:
assignee: nobody → pipping (pipping)
status: New → Fix Committed
pipping (pipping)
Changed in asdf:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers