Project

General

Profile

Actions

Bug #13683

closed

libc: uninitialized variables

Added by Toomas Soome about 1 month ago. Updated about 1 month ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
lib - userland libraries
Start date:
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:

Description

Build errors with gcc 10 on SPARC:

    ../sparc/fp/_Q_cplx_div.c: In function '_Q_cplx_div':
    ../sparc/fp/_Q_cplx_div.c:195:25: error: 'v' is used uninitialized in this function [-Werror=uninitialized]
      195 |  ((long double *)&v)[0] = (a * c + b * d) * r;
          |  ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~
    cc1: all warnings being treated as errors

    ../sparc/fp/_Q_cplx_div_ix.c: In function '_Q_cplx_div_ix':
    ../sparc/fp/_Q_cplx_div_ix.c:182:25: error: 'v' is used uninitialized in this function [-Werror=uninitialized]
      182 |  ((long double *)&v)[0] = d;
          |  ~~~~~~~~~~~~~~~~~~~~~~~^~~
    cc1: all warnings being treated as errors

    ../sparc/fp/_Q_cplx_lr_div.c: In function '_Q_cplx_lr_div':
    ../sparc/fp/_Q_cplx_lr_div.c:65:25: error: 'v' is used uninitialized in this function [-Werror=uninitialized]
       65 |  ((long double *)&v)[0] = (a * c + b * d) * r;
          |  ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~
    cc1: all warnings being treated as errors

    ../sparc/fp/_Q_cplx_lr_div_ix.c: In function '_Q_cplx_lr_div_ix':
    ../sparc/fp/_Q_cplx_lr_div_ix.c:64:25: error: 'v' is used uninitialized in this function [-Werror=uninitialized]
       64 |  ((long double *)&v)[0] = b * d;
          |  ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
    cc1: all warnings being treated as errors

    ../sparc/fp/_Q_cplx_lr_div_rx.c: In function '_Q_cplx_lr_div_rx':
    ../sparc/fp/_Q_cplx_lr_div_rx.c:64:25: error: 'v' is used uninitialized in this function [-Werror=uninitialized]
       64 |  ((long double *)&v)[0] = a * c;
          |  ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
    cc1: all warnings being treated as errors

    ../sparc/fp/_Q_cplx_lr_mul.c: In function '_Q_cplx_lr_mul':
    ../sparc/fp/_Q_cplx_lr_mul.c:62:25: error: 'v' is used uninitialized in this function [-Werror=uninitialized]
       62 |  ((long double *)&v)[0] = (a * c - b * d);
          |  ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
    cc1: all warnings being treated as errors

    ../sparc/fp/_Q_cplx_mul.c: In function '_Q_cplx_mul':
    ../sparc/fp/_Q_cplx_mul.c:145:25: error: 'v' is used uninitialized in this function [-Werror=uninitialized]
      145 |  ((long double *)&v)[0] = x;
          |  ~~~~~~~~~~~~~~~~~~~~~~~^~~
    cc1: all warnings being treated as errors

    ../sparc/fp/_Q_cplx_div_rx.c: In function '_Q_cplx_div_rx':
    ../sparc/fp/_Q_cplx_div_rx.c:182:25: error: 'v' is used uninitialized in this function [-Werror=uninitialized]
      182 |  ((long double *)&v)[0] = c;
          |  ~~~~~~~~~~~~~~~~~~~~~~~^~~
    cc1: all warnings being treated as errors

    fp/_F_cplx_mul.c: In function '_F_cplx_mul':
    fp/_F_cplx_mul.c:137:19: error: 'v' is used uninitialized in this function [-Werror=uninitialized]
      137 |  ((float *)&v)[0] = (float)x;
          |  ~~~~~~~~~~~~~~~~~^~~~~~~~~~
    cc1: all warnings being treated as errors

    fp/_D_cplx_mul.c: In function '_D_cplx_mul':
    fp/_D_cplx_mul.c:139:20: error: 'v' is used uninitialized in this function [-Werror=uninitialized]
      139 |  ((double *)&v)[0] = x;
          |  ~~~~~~~~~~~~~~~~~~^~~
    cc1: all warnings being treated as errors

Testiong done: build/install/boot (SPARC).


Related issues

Related to illumos gate - Bug #13593: libc: uninitialized variablesClosedToomas Soome

Actions
Actions #1

Updated by Toomas Soome about 1 month ago

  • Related to Bug #13593: libc: uninitialized variables added
Actions #2

Updated by Electric Monk about 1 month ago

  • Gerrit CR set to 1377
Actions #3

Updated by Toomas Soome about 1 month ago

  • Description updated (diff)
Actions #4

Updated by Electric Monk about 1 month ago

  • Status changed from In Progress to Closed
  • % Done changed from 90 to 100

git commit 1d9fea2a5ece48bb3a7c454829f0c8a68b9fe5e1

commit  1d9fea2a5ece48bb3a7c454829f0c8a68b9fe5e1
Author: Toomas Soome <tsoome@me.com>
Date:   2021-04-01T18:45:43.000Z

    13683 libc: uninitialized variables
    Reviewed by: C Fraire <cfraire@me.com>
    Approved by: Dan McDonald <danmcd@joyent.com>

Actions

Also available in: Atom PDF