aboutsummaryrefslogtreecommitdiff
path: root/include/opcode/hppa.h
diff options
context:
space:
mode:
authorTom de Vries <tdevries@suse.de>2025-07-05 13:29:53 +0200
committerTom de Vries <tdevries@suse.de>2025-07-05 13:29:53 +0200
commite7dd0a0cf4f439f444f4a15d8ea4e1ab8185acbf (patch)
tree854e1e4730be5ec88527ca58840334470f01b79c /include/opcode/hppa.h
parentb930f28b490d2b45049497afa66e1b42aeffbc9b (diff)
downloadbinutils-master.zip
binutils-master.tar.gz
binutils-master.tar.bz2
[gdb/tdep] Fix selftest scoped_mmap on freebsdHEADmaster
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 'include/opcode/hppa.h')
0 files changed, 0 insertions, 0 deletions