Print this page
12385 tst.subr.d needs fixing for NULL as a pointer

Split Close
Expand all
Collapse all
          --- old/usr/src/cmd/dtrace/test/tst/common/aggs/tst.subr.d
          +++ new/usr/src/cmd/dtrace/test/tst/common/aggs/tst.subr.d
↓ open down ↓ 14 lines elided ↑ open up ↑
  15   15   * If applicable, add the following below this CDDL HEADER, with the
  16   16   * fields enclosed by brackets "[]" replaced with your own identifying
  17   17   * information: Portions Copyright [yyyy] [name of copyright owner]
  18   18   *
  19   19   * CDDL HEADER END
  20   20   */
  21   21  
  22   22  /*
  23   23   * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
  24   24   * Use is subject to license terms.
  25      - * Copyright (c) 2012, Joyent, Inc.  All rights reserved.
       25 + * Copyright 2020 Joyent, Inc.
  26   26   */
  27   27  
  28   28  #include <sys/dtrace.h>
  29   29  
  30   30  #define INTFUNC(x)                      \
  31   31          BEGIN                           \
  32   32          /*DSTYLED*/                     \
  33   33          {                               \
  34   34                  subr++;                 \
  35   35                  @[(long)x] = sum(1);    \
↓ open down ↓ 18 lines elided ↑ open up ↑
  54   54          }
  55   55  
  56   56  INTFUNC(rand())
  57   57  INTFUNC(mutex_owned(&`cpu_lock))
  58   58  INTFUNC(mutex_owner(&`cpu_lock))
  59   59  INTFUNC(mutex_type_adaptive(&`cpu_lock))
  60   60  INTFUNC(mutex_type_spin(&`cpu_lock))
  61   61  INTFUNC(rw_read_held(&`vfssw_lock))
  62   62  INTFUNC(rw_write_held(&`vfssw_lock))
  63   63  INTFUNC(rw_iswriter(&`vfssw_lock))
  64      -INTFUNC(copyin(NULL, 1))
  65      -STRFUNC(copyinstr(NULL, 1))
       64 +INTFUNC(copyin((uintptr_t)NULL, 1))
       65 +STRFUNC(copyinstr((uintptr_t)NULL, 1))
  66   66  INTFUNC(speculation())
  67   67  INTFUNC(progenyof($pid))
  68   68  INTFUNC(strlen("fooey"))
  69   69  VOIDFUNC(copyout)
  70   70  VOIDFUNC(copyoutstr)
  71   71  INTFUNC(alloca(10))
  72   72  VOIDFUNC(bcopy)
  73   73  VOIDFUNC(copyinto)
  74   74  INTFUNC(msgdsize(NULL))
  75   75  INTFUNC(msgsize(NULL))
↓ open down ↓ 41 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX