10936 umem_genasm needs to be stricter about segments

Review Request #1837 — Created May 9, 2019 and submitted

rm
illumos-gate
master
10936
be29d4b...
general

10936 umem_genasm needs to be stricter about segments
10937 Clean up umem smatch and cerrwarn
Reviewed by: Cody Peter Mello <melloc@joyent.com>
Reviewed by: Patrick Mooney <patrick.mooney@joyent.com>



  • 0
  • 0
  • 0
  • 1
  • 1
Description From Last Updated
tsoome
  1. Ship It!
  2. 
      
citrus
  1. 
      
  2. usr/src/lib/libumem/common/vmem.c (Diff revision 1)
     
     

    For strict standards compliance, should this not be addr = (uintptr_t)NULL, and the same for the check later?

    Ship it either way!

    1. Can you explain why it needs to be that way? The assignments to addr are either taddr, another uintptr_t or the result of the P2PHASEUP macro which itself is using arguments that have already been cast to a uintptr_t. I'm not sure it makes sense at this point to use the cast NULL, but maybe there's something more intricate going on?

    2. I misunderstood the use of 0 as a sentinel value to indicate when the value had not been updated. Since 0 is never valid in memory, this is fine; sorry for the noise.

  3. 
      
rm
Review request changed

Status: Closed (submitted)

Loading...