https://bugs.kde.org/show_bug.cgi?id=499212

            Bug ID: 499212
           Summary: mmap() with MAP_ALIGNED() returns unaligned pointer
                    under memcheck
    Classification: Developer tools
           Product: valgrind
           Version: 3.24 GIT
          Platform: FreeBSD Ports
                OS: FreeBSD
            Status: REPORTED
          Severity: minor
          Priority: NOR
         Component: memcheck
          Assignee: jsew...@acm.org
          Reporter: bugs.kde....@sjh.sh
  Target Milestone: ---

Created attachment 177726
  --> https://bugs.kde.org/attachment.cgi?id=177726&action=edit
Simple program to test alignment of mmap() result

SUMMARY
When running under valgriund, the pointer returned by mmap(NULL, 1<<20,
PROT_WRITE | PROT_READ, MAP_PRIVATE | MAP_NOSYNC | MAP_ALIGNED(20), -1 ,0) is
not correctly aligned.

STEPS TO REPRODUCE
1. Call mmap() with MAP_ALIGNED(20) flag on FreeBSD

OBSERVED RESULT
Pointer is one page past alignment

EXPECTED RESULT
Pointer is aligned as requested

SOFTWARE/OS VERSIONS
FreeBSD: 14.2-RELEASE

ADDITIONAL INFORMATION
Test case attached.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to