diff options
author | Tom de Vries <tdevries@suse.de> | 2025-07-05 13:29:53 +0200 |
---|---|---|
committer | Tom de Vries <tdevries@suse.de> | 2025-07-05 13:29:53 +0200 |
commit | e7dd0a0cf4f439f444f4a15d8ea4e1ab8185acbf (patch) | |
tree | 854e1e4730be5ec88527ca58840334470f01b79c /libctf/configure | |
parent | b930f28b490d2b45049497afa66e1b42aeffbc9b (diff) | |
download | binutils-master.zip binutils-master.tar.gz binutils-master.tar.bz2 |
On x86_64-freebsd, I run into:
...
$ gdb -q -batch -ex "maint selftest scoped_mmap"
Running selftest scoped_mmap.
Self test failed: self-test failed at scoped_mmap-selftests.c:50
Failures:
scoped_mmap
Ran 1 unit tests, 1 failed
...
The problem is that this call:
...
::scoped_mmap smmap (nullptr, sysconf (_SC_PAGESIZE), PROT_WRITE,
MAP_ANONYMOUS | MAP_PRIVATE, 0, 0);
...
returns MAP_FAILED and sets errno to EINVAL because the argument fd == 0.
If MAP_ANONYMOUS is used, fd == -1 should be used on freebsd. On linux, fd is
ignored but -1 is recommended for portability.
Fix this by using fd == -1 instead.
Tested x86_64-freebsd and x86_64-linux.
Diffstat (limited to 'libctf/configure')
0 files changed, 0 insertions, 0 deletions