NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: PR/56780 CVS commit: src/tests/lib/libc/sys



The following reply was made to PR kern/56780; it has been noted by GNATS.

From: Martin Husemann <martin%duskware.de@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc: 
Subject: Re: PR/56780 CVS commit: src/tests/lib/libc/sys
Date: Tue, 5 Apr 2022 18:19:31 +0200

 On Tue, Apr 05, 2022 at 04:00:04PM +0000, Andreas Gustafsson wrote:
 >  Log Message:
 >  In the mmap_err test case, mmap the address, not the address of the address.
 >  Should fix PR kern/56780.
 
 I don't think this is the best possible fix.
 
 The test could have been meant to test for two things, and IMHO should
 test for both:
 
  - mmap with MAP_FIXED for a not page aligned value (that is what you
    have made it to do in most cases, but not very portable), but I think
    this is not what it was originally about.
    If we want to make it test for that, the fixed address should be picked
    better and get a comment (i.e. it should be within the VM space limits
    for the architecture, and if we do below maybe it should be made sure
    that the address is inside an unmapped region)
 
  - mmap with MAP_FIXED and a address that is already mapped (this was my
    initial reading and what the test did test most of the time before we
    started to randomize stack addresses)
 
 Martin
 


Home | Main Index | Thread Index | Old Index