Project

General

Profile

Bug #12427

stand: smatch and NULL pointer errors

Added by Toomas Soome 8 days ago.

Status:
In Progress
Priority:
Normal
Assignee:
Category:
bootloader
Start date:
Due date:
% Done:

90%

Estimated time:
Difficulty:
Medium
Tags:

Description

Build errors on SPARC stand tree:

    /code/illumos-gate/usr/src/tools/proto/root_sparc-nd/opt/onbld/bin/sparc/sma
tch: auth_unix.c:96 authunix_create() warn: ignoring unreachable code.
    /code/illumos-gate/usr/src/tools/proto/root_sparc-nd/opt/onbld/bin/sparc/sma
tch: auth_unix.c:102 authunix_create() warn: ignoring unreachable code.
    /code/illumos-gate/usr/src/tools/proto/root_sparc-nd/opt/onbld/bin/sparc/sma
tch: auth_unix.c:130 authunix_create() warn: ignoring unreachable code.
    /code/illumos-gate/usr/src/tools/proto/root_sparc-nd/opt/onbld/bin/sparc/sma
tch: auth_unix.c:138 authunix_create() warn: ignoring unreachable code.
    /code/illumos-gate/usr/src/tools/proto/root_sparc-nd/opt/onbld/bin/sparc/sma
tch: auth_unix.c:225 authunix_refresh() error: unchecked function return '(*xdrs
.x_ops->x_setpostn)'

    /code/illumos-gate/usr/src/tools/proto/root_sparc-nd/opt/onbld/bin/sparc/smatch: getdents.c:173 nfsgetdents() error: strcpy() 'ep->name' too large for 'dep->d_name' (1048569 vs 1)

    /code/illumos-gate/usr/src/tools/proto/root_sparc-nd/opt/onbld/bin/sparc/smatch: getdents3.c:174 nfs3getdents() error: strcpy() 'ep->name' too large for 'dep->d_name' (1048569 vs 1)

    /code/illumos-gate/usr/src/tools/proto/root_sparc-nd/opt/onbld/bin/sparc/smatch: bootparams.c:169 whoami() error: unchecked function return 'sethostname'

    /code/illumos-gate/usr/src/tools/proto/root_sparc-nd/opt/onbld/bin/sparc/smatch: clnt_btcp.c:184 clntbtcp_create() error: unchecked function return 'close'
    /code/illumos-gate/usr/src/tools/proto/root_sparc-nd/opt/onbld/bin/sparc/smatch: clnt_btcp.c:193 clntbtcp_create() error: unchecked function return 'close'

    /code/illumos-gate/usr/src/tools/proto/root_sparc-nd/opt/onbld/bin/sparc/smatch: clnt_budp.c:275 clntbudp_call() error: unchecked function return '(*xdrs->x_ops->x_setpostn)'

    /code/illumos-gate/usr/src/tools/proto/root_sparc-nd/opt/onbld/bin/sparc/smatch: pmap.c:249 xdr_rmtcall_args() error: unchecked function return '(*xdrs->x_ops->x_setpostn)'
    /code/illumos-gate/usr/src/tools/proto/root_sparc-nd/opt/onbld/bin/sparc/smatch: pmap.c:252 xdr_rmtcall_args() error: unchecked function return '(*xdrs->x_ops->x_setpostn)'
    /code/illumos-gate/usr/src/tools/proto/root_sparc-nd/opt/onbld/bin/sparc/smatch: pmap.c:302 xdr_rpcb_rmtcallargs() error: unchecked function return '(*xdrs->x_ops->x_setpostn)'
    /code/illumos-gate/usr/src/tools/proto/root_sparc-nd/opt/onbld/bin/sparc/smatch: pmap.c:305 xdr_rpcb_rmtcallargs() error: unchecked function return '(*xdrs->x_ops->x_setpostn)'

    /code/illumos-gate/usr/src/tools/proto/root_sparc-nd/opt/onbld/bin/sparc/smatch: mount.c:656 boot_nfs_mountroot() error: unchecked function return 'gethostname'

    /code/illumos-gate/usr/src/tools/proto/root_sparc-nd/opt/onbld/bin/sparc/smatch: nfs4ops.c:122 nfs4read() warn: inconsistent indenting

    /code/illumos-gate/usr/src/tools/proto/root_sparc-nd/opt/onbld/bin/sparc/smatch: lookup.c:290 stlookuppn() error: unchecked function return 'stpn_get'

    lufsboot.c: In function 'lufs_boot_init':
    lufsboot.c:487: error: comparison between pointer and integer
    lufsboot.c: In function 'lufs_logscan_skip':
    lufsboot.c:635: error: comparison between pointer and integer
    /code/illumos-gate/usr/src/tools/proto/root_sparc-nd/opt/onbld/bin/sparc/smatch: lufsboot.c:599 lufs_logscan_read() warn: unsigned 'd->d_typ' is never less than zero.

    /code/illumos-gate/usr/src/tools/proto/root_sparc-nd/opt/onbld/bin/sparc/smatch: ufsops.c:570 boot_ufs_read() error: unchecked function return 'getblock'
    /code/illumos-gate/usr/src/tools/proto/root_sparc-nd/opt/onbld/bin/sparc/smatch: ufsops.c:700 boot_ufs_open() error: unchecked function return 'boot_ufs_close'
    /code/illumos-gate/usr/src/tools/proto/root_sparc-nd/opt/onbld/bin/sparc/smatch: ufsops.c:704 boot_ufs_open() error: unchecked function return 'boot_ufs_close'
    /code/illumos-gate/usr/src/tools/proto/root_sparc-nd/opt/onbld/bin/sparc/smatch: ufsops.c:948 boot_ufs_getdents() error: strcpy() 'dp->d_name' too large for 'dep->d_name' (281 vs 1)

    /code/illumos-gate/usr/src/tools/proto/root_sparc-nd/opt/onbld/bin/sparc/smatch: hsfsops.c:427 boot_hsfs_read() error: unchecked function return 'getblock'
    /code/illumos-gate/usr/src/tools/proto/root_sparc-nd/opt/onbld/bin/sparc/smatch: hsfsops.c:939 parse_susp() warn: inconsistent indenting
    /code/illumos-gate/usr/src/tools/proto/root_sparc-nd/opt/onbld/bin/sparc/smatch: hsfsops.c:1043 boot_hsfs_getdents() error: strcpy() 'hdp->hs_ufs_dir.d_name' too large for 'dep->d_name' (281 vs 1)

    ipv4.c: In function 'inet_addr':
    ipv4.c:1143: error: comparison between pointer and integer

    /code/illumos-gate/usr/src/tools/proto/root_sparc-nd/opt/onbld/bin/sparc/smatch: rpc.c:304 brpc_call() error: unchecked function return 'gethostname'

    /code/illumos-gate/usr/src/tools/proto/root_sparc-nd/opt/onbld/bin/sparc/smatch:
     ../../../uts/common/rpc/xdr.c:83 xdr_free() error: unchecked function return '(
    *proc)'

    /code/illumos-gate/usr/src/tools/proto/root_sparc-nd/opt/onbld/bin/sparc/smatch:
     tcp.c:1737 tcp_state_wait() warn: variable dereferenced before check 'tcp' (see
     line 1716)
    /code/illumos-gate/usr/src/tools/proto/root_sparc-nd/opt/onbld/bin/sparc/smatch:
     tcp.c:2557 tcp_sack_rxmit() warn: signed overflow undefined. 'usable_swnd * mss
     < mss'
    /code/illumos-gate/usr/src/tools/proto/root_sparc-nd/opt/onbld/bin/sparc/smatch:
     tcp.c:3946 tcp_rput_data() warn: ignoring unreachable code.
    /code/illumos-gate/usr/src/tools/proto/root_sparc-nd/opt/onbld/bin/sparc/smatch:
     tcp.c:4101 tcp_rput_data() warn: Function too hairy.  No more merges.
    /code/illumos-gate/usr/src/tools/proto/root_sparc-nd/opt/onbld/bin/sparc/smatch:
     tcp.c:4101 tcp_rput_data() parse error: Function too hairy.  Giving up. 148 sec
    onds
    /code/illumos-gate/usr/src/tools/proto/root_sparc-nd/opt/onbld/bin/sparc/smatch:
     tcp.c:5993 tcp_xmit_mp() warn: curly braces intended?

    machdep.c: In function 'restore_tlb':
    machdep.c:173: error: comparison between pointer and integer

    /code/illumos-gate/usr/src/tools/proto/root_sparc-nd/opt/onbld/bin/sparc/smatch:
     util.c:495 cb_usb_setup() warn: '"" /" select-dev new-device " nulldev" device-
    name : read 2drop -2 ; : open true ; : close ; : install-abort ; : remove-abort
    ; : write 2drop 0 ; : restore ; finish-device unselect-dev"' 8924590107228188672
     can't fit into 127 '*(cb_nulldev[0])'

    ../../common/readfile.c: In function 'read_elf32':
    ../../common/readfile.c:472: error: comparison between pointer and integer
    ../../common/readfile.c:662: error: comparison between pointer and integer
    ../../common/readfile.c:683: error: comparison between pointer and integer
    ../../common/readfile.c: In function 'read_elf64':
    ../../common/readfile.c:883: error: comparison between pointer and integer
    ../../common/readfile.c:1072: error: comparison between pointer and integer
    ../../common/readfile.c: In function 'iload64':
    ../../common/readfile.c:1351: error: comparison between pointer and integer

    /code/illumos-gate/usr/src/tools/proto/root_sparc-nd/opt/onbld/bin/sparc/smatch:
     ../../common/heap_kmem.c:685 kmem_free() warn: ignoring unreachable code.

Also available in: Atom PDF