summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan McDonald <danmcd@joyent.com>2021-03-03 10:34:25 -0500
committerDan McDonald <danmcd@joyent.com>2021-03-03 10:34:25 -0500
commit41b2f982c9abafca48918d2ebe5f11f57e5cfa36 (patch)
treee3351d52a7db4b7b07090b0b052e0de76622913d
parent6e328f367d9cab0f5edb03286642f5533dc2c362 (diff)
parentc764c31dc69b9f3126169050c6e4b771cea45370 (diff)
downloadillumos-joyent-41b2f982c9abafca48918d2ebe5f11f57e5cfa36.tar.gz
[illumos-gate merge]
commit c764c31dc69b9f3126169050c6e4b771cea45370 13593 libc: uninitialized variables commit 454c9e74c7c117274fb3612dc713f144088203bf 13538 logadm: multiply-defined symbols commit ba32d0fa40167766c2c4c2a83c7475bd3aed4258 13562 zlogin for Solaris10 branded zones does not work after implementation of Feature #13274
-rw-r--r--usr/src/cmd/logadm/err.c1
-rw-r--r--usr/src/cmd/logadm/err.h4
-rw-r--r--usr/src/cmd/logadm/main.c2
-rw-r--r--usr/src/lib/brand/shared/brand/Makefile.com5
-rw-r--r--usr/src/lib/brand/solaris10/s10_brand/Makefile.com5
-rw-r--r--usr/src/lib/libc/i386/fp/_D_cplx_lr_div.c4
-rw-r--r--usr/src/lib/libc/i386/fp/_D_cplx_lr_div_ix.c4
-rw-r--r--usr/src/lib/libc/i386/fp/_D_cplx_lr_div_rx.c4
-rw-r--r--usr/src/lib/libc/i386/fp/_D_cplx_mul.c6
-rw-r--r--usr/src/lib/libc/i386/fp/_F_cplx_lr_div.c4
-rw-r--r--usr/src/lib/libc/i386/fp/_F_cplx_lr_div_ix.c4
-rw-r--r--usr/src/lib/libc/i386/fp/_F_cplx_lr_div_rx.c4
-rw-r--r--usr/src/lib/libc/i386/fp/_F_cplx_mul.c4
-rw-r--r--usr/src/lib/libc/i386/fp/_X_cplx_lr_div.c4
-rw-r--r--usr/src/lib/libc/i386/fp/_X_cplx_lr_div_ix.c4
-rw-r--r--usr/src/lib/libc/i386/fp/_X_cplx_lr_div_rx.c4
-rw-r--r--usr/src/lib/libc/i386/fp/_X_cplx_mul.c4
17 files changed, 28 insertions, 39 deletions
diff --git a/usr/src/cmd/logadm/err.c b/usr/src/cmd/logadm/err.c
index 5663232ec2..e1dc015899 100644
--- a/usr/src/cmd/logadm/err.c
+++ b/usr/src/cmd/logadm/err.c
@@ -34,6 +34,7 @@
#include <errno.h>
#include "err.h"
+jmp_buf Err_env;
jmp_buf *Err_env_ptr;
static const char *Myname;
static int Exitcode;
diff --git a/usr/src/cmd/logadm/err.h b/usr/src/cmd/logadm/err.h
index de2abd9300..e712770511 100644
--- a/usr/src/cmd/logadm/err.h
+++ b/usr/src/cmd/logadm/err.h
@@ -50,7 +50,7 @@ void err_mailto(const char *recipient);
#define EF_JMP 0x08 /* longjmp through Error_env after printing error */
#define EF_RAW 0x10 /* don't prepend/append anything to message */
-jmp_buf Err_env;
+extern jmp_buf Err_env;
extern jmp_buf *Err_env_ptr;
#define SETJMP setjmp(*(Err_env_ptr = &Err_env))
@@ -70,7 +70,7 @@ void err_free(void *ptr, const char *fname, int line);
#define STRDUP(ptr) err_strdup(ptr, __FILE__, __LINE__)
char *err_strdup(const char *ptr, const char *fname, int line);
-int Debug; /* replace with #define to zero to compile out Debug code */
+extern int Debug; /* replace with #define to zero to compile out Debug code */
#ifdef __cplusplus
}
diff --git a/usr/src/cmd/logadm/main.c b/usr/src/cmd/logadm/main.c
index 15f71be166..a2884b9321 100644
--- a/usr/src/cmd/logadm/main.c
+++ b/usr/src/cmd/logadm/main.c
@@ -82,6 +82,8 @@ static char *Chown = "/bin/chown";
static char *Gzip = "/bin/gzip";
static char *Mkdir = "/bin/mkdir";
+int Debug;
+
/* return from time(0), gathered early on to avoid slewed timestamps */
time_t Now;
diff --git a/usr/src/lib/brand/shared/brand/Makefile.com b/usr/src/lib/brand/shared/brand/Makefile.com
index 0d5afe31f6..f88ee2a794 100644
--- a/usr/src/lib/brand/shared/brand/Makefile.com
+++ b/usr/src/lib/brand/shared/brand/Makefile.com
@@ -55,6 +55,11 @@ CPPFLAGS += -D_REENTRANT -U_ASM -I. -I../sys
CFLAGS += $(CCVERBOSE)
ASFLAGS = -P $(ASFLAGS_$(CURTYPE)) -D_ASM -I. -I../sys
+#
+# Disable stack protection as this code might be running in an s10 context.
+#
+STACKPROTECT = none
+
# intentional code after abort()
SMOFF += unreachable
diff --git a/usr/src/lib/brand/solaris10/s10_brand/Makefile.com b/usr/src/lib/brand/solaris10/s10_brand/Makefile.com
index d4c5e5f683..dd3f0c5d73 100644
--- a/usr/src/lib/brand/solaris10/s10_brand/Makefile.com
+++ b/usr/src/lib/brand/solaris10/s10_brand/Makefile.com
@@ -84,6 +84,11 @@ DYNFLAGS += $(DYNFLAGS_$(CLASS))
DYNFLAGS += $(BLOCAL) $(ZNOVERSION) -Wl,-e_start
LDLIBS += -lmapmalloc -lc
+#
+# Disable stack protection as we're running in an s10 context.
+#
+STACKPROTECT = none
+
CERRWARN += $(CNOWARN_UNINIT)
$(LIBS):= PICS += $(SHAREDOBJS)
diff --git a/usr/src/lib/libc/i386/fp/_D_cplx_lr_div.c b/usr/src/lib/libc/i386/fp/_D_cplx_lr_div.c
index 19d6bab92a..22d10279bd 100644
--- a/usr/src/lib/libc/i386/fp/_D_cplx_lr_div.c
+++ b/usr/src/lib/libc/i386/fp/_D_cplx_lr_div.c
@@ -24,8 +24,6 @@
* Use is subject to license terms.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
/*
* _D_cplx_lr_div(z, w) returns z / w computed by the textbook
* formula without regard to exceptions or special cases.
@@ -41,7 +39,7 @@
double _Complex
_D_cplx_lr_div(double _Complex z, double _Complex w)
{
- double _Complex v;
+ double _Complex v = 0;
long double a, b, c, d, r;
/* LINTED alignment */
diff --git a/usr/src/lib/libc/i386/fp/_D_cplx_lr_div_ix.c b/usr/src/lib/libc/i386/fp/_D_cplx_lr_div_ix.c
index aa37afcee0..1fbdb6459c 100644
--- a/usr/src/lib/libc/i386/fp/_D_cplx_lr_div_ix.c
+++ b/usr/src/lib/libc/i386/fp/_D_cplx_lr_div_ix.c
@@ -24,8 +24,6 @@
* Use is subject to license terms.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
/*
* _D_cplx_div_ix(b, w) returns (I * b) / w computed by the text-
* book formula without regard to exceptions or special cases.
@@ -41,7 +39,7 @@
double _Complex
_D_cplx_lr_div_ix(double b, double _Complex w)
{
- double _Complex v;
+ double _Complex v = 0;
long double c, d, r;
/* LINTED alignment */
diff --git a/usr/src/lib/libc/i386/fp/_D_cplx_lr_div_rx.c b/usr/src/lib/libc/i386/fp/_D_cplx_lr_div_rx.c
index d0e4d43f69..0ccf7d9ee3 100644
--- a/usr/src/lib/libc/i386/fp/_D_cplx_lr_div_rx.c
+++ b/usr/src/lib/libc/i386/fp/_D_cplx_lr_div_rx.c
@@ -24,8 +24,6 @@
* Use is subject to license terms.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
/*
* _D_cplx_lr_div_rx(a, w) returns a / w computed by the textbook
* formula without regard to exceptions or special cases.
@@ -41,7 +39,7 @@
double _Complex
_D_cplx_lr_div_rx(double a, double _Complex w)
{
- double _Complex v;
+ double _Complex v = 0;
long double c, d, r;
/* LINTED alignment */
diff --git a/usr/src/lib/libc/i386/fp/_D_cplx_mul.c b/usr/src/lib/libc/i386/fp/_D_cplx_mul.c
index 4d34d5224a..89df44dc9f 100644
--- a/usr/src/lib/libc/i386/fp/_D_cplx_mul.c
+++ b/usr/src/lib/libc/i386/fp/_D_cplx_mul.c
@@ -24,8 +24,6 @@
* Use is subject to license terms.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
/*
* _D_cplx_mul(z, w) returns z * w with infinities handled according
* to C99.
@@ -74,13 +72,13 @@ testinf(double x)
xx.d = x;
return (((((xx.i[1] << 1) - 0xffe00000) | xx.i[0]) == 0)?
- (1 | (xx.i[1] >> 31)) : 0);
+ (1 | (xx.i[1] >> 31)) : 0);
}
double _Complex
_D_cplx_mul(double _Complex z, double _Complex w)
{
- double _Complex v;
+ double _Complex v = 0;
double a, b, c, d;
long double x, y;
int recalc, i, j;
diff --git a/usr/src/lib/libc/i386/fp/_F_cplx_lr_div.c b/usr/src/lib/libc/i386/fp/_F_cplx_lr_div.c
index 53bccfacf4..37340c529b 100644
--- a/usr/src/lib/libc/i386/fp/_F_cplx_lr_div.c
+++ b/usr/src/lib/libc/i386/fp/_F_cplx_lr_div.c
@@ -24,8 +24,6 @@
* Use is subject to license terms.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
/*
* _F_cplx_lr_div(z, w) returns z / w computed by the textbook
* formula without regard to exceptions or special cases.
@@ -41,7 +39,7 @@
float _Complex
_F_cplx_lr_div(float _Complex z, float _Complex w)
{
- float _Complex v;
+ float _Complex v = 0;
long double a, b, c, d, r;
a = ((float *)&z)[0];
diff --git a/usr/src/lib/libc/i386/fp/_F_cplx_lr_div_ix.c b/usr/src/lib/libc/i386/fp/_F_cplx_lr_div_ix.c
index d43a346e98..0ab7991005 100644
--- a/usr/src/lib/libc/i386/fp/_F_cplx_lr_div_ix.c
+++ b/usr/src/lib/libc/i386/fp/_F_cplx_lr_div_ix.c
@@ -24,8 +24,6 @@
* Use is subject to license terms.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
/*
* _F_cplx_div_ix(b, w) returns (I * b) / w computed by the text-
* book formula without regard to exceptions or special cases.
@@ -41,7 +39,7 @@
float _Complex
_F_cplx_lr_div_ix(float b, float _Complex w)
{
- float _Complex v;
+ float _Complex v = 0;
long double c, d, r;
c = ((float *)&w)[0];
diff --git a/usr/src/lib/libc/i386/fp/_F_cplx_lr_div_rx.c b/usr/src/lib/libc/i386/fp/_F_cplx_lr_div_rx.c
index 7192c150d6..3ea175fbc0 100644
--- a/usr/src/lib/libc/i386/fp/_F_cplx_lr_div_rx.c
+++ b/usr/src/lib/libc/i386/fp/_F_cplx_lr_div_rx.c
@@ -24,8 +24,6 @@
* Use is subject to license terms.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
/*
* _F_cplx_lr_div_rx(a, w) returns a / w computed by the textbook
* formula without regard to exceptions or special cases.
@@ -41,7 +39,7 @@
float _Complex
_F_cplx_lr_div_rx(float a, float _Complex w)
{
- float _Complex v;
+ float _Complex v = 0;
long double c, d, r;
c = ((float *)&w)[0];
diff --git a/usr/src/lib/libc/i386/fp/_F_cplx_mul.c b/usr/src/lib/libc/i386/fp/_F_cplx_mul.c
index 7c2a170815..2c74215791 100644
--- a/usr/src/lib/libc/i386/fp/_F_cplx_mul.c
+++ b/usr/src/lib/libc/i386/fp/_F_cplx_mul.c
@@ -24,8 +24,6 @@
* Use is subject to license terms.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
/*
* _F_cplx_mul(z, w) returns z * w with infinities handled according
* to C99.
@@ -79,7 +77,7 @@ testinff(float x)
float _Complex
_F_cplx_mul(float _Complex z, float _Complex w)
{
- float _Complex v;
+ float _Complex v = 0;
float a, b, c, d;
long double x, y;
int recalc, i, j;
diff --git a/usr/src/lib/libc/i386/fp/_X_cplx_lr_div.c b/usr/src/lib/libc/i386/fp/_X_cplx_lr_div.c
index f65868d172..3560bf72ff 100644
--- a/usr/src/lib/libc/i386/fp/_X_cplx_lr_div.c
+++ b/usr/src/lib/libc/i386/fp/_X_cplx_lr_div.c
@@ -24,8 +24,6 @@
* Use is subject to license terms.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
/*
* _X_cplx_lr_div(z, w) returns z / w computed by the textbook
* formula without regard to exceptions or special cases.
@@ -41,7 +39,7 @@
long double _Complex
_X_cplx_lr_div(long double _Complex z, long double _Complex w)
{
- long double _Complex v;
+ long double _Complex v = 0;
long double a, b, c, d, r;
a = ((long double *)&z)[0];
diff --git a/usr/src/lib/libc/i386/fp/_X_cplx_lr_div_ix.c b/usr/src/lib/libc/i386/fp/_X_cplx_lr_div_ix.c
index cd27b7adde..6718077db7 100644
--- a/usr/src/lib/libc/i386/fp/_X_cplx_lr_div_ix.c
+++ b/usr/src/lib/libc/i386/fp/_X_cplx_lr_div_ix.c
@@ -24,8 +24,6 @@
* Use is subject to license terms.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
/*
* _X_cplx_div_ix(b, w) returns (I * b) / w computed by the text-
* book formula without regard to exceptions or special cases.
@@ -41,7 +39,7 @@
long double _Complex
_X_cplx_lr_div_ix(long double b, long double _Complex w)
{
- long double _Complex v;
+ long double _Complex v = 0;
long double c, d, r;
c = ((long double *)&w)[0];
diff --git a/usr/src/lib/libc/i386/fp/_X_cplx_lr_div_rx.c b/usr/src/lib/libc/i386/fp/_X_cplx_lr_div_rx.c
index 914fd10629..00b2646539 100644
--- a/usr/src/lib/libc/i386/fp/_X_cplx_lr_div_rx.c
+++ b/usr/src/lib/libc/i386/fp/_X_cplx_lr_div_rx.c
@@ -24,8 +24,6 @@
* Use is subject to license terms.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
/*
* _X_cplx_lr_div_rx(a, w) returns a / w computed by the textbook
* formula without regard to exceptions or special cases.
@@ -41,7 +39,7 @@
long double _Complex
_X_cplx_lr_div_rx(long double a, long double _Complex w)
{
- long double _Complex v;
+ long double _Complex v = 0;
long double c, d, r;
c = ((long double *)&w)[0];
diff --git a/usr/src/lib/libc/i386/fp/_X_cplx_mul.c b/usr/src/lib/libc/i386/fp/_X_cplx_mul.c
index 6ecebb4d7a..2306d5a2af 100644
--- a/usr/src/lib/libc/i386/fp/_X_cplx_mul.c
+++ b/usr/src/lib/libc/i386/fp/_X_cplx_mul.c
@@ -24,8 +24,6 @@
* Use is subject to license terms.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
/*
* _X_cplx_mul(z, w) returns z * w with infinities handled according
* to C99.
@@ -83,7 +81,7 @@ testinfl(long double x)
long double _Complex
_X_cplx_mul(long double _Complex z, long double _Complex w)
{
- long double _Complex v;
+ long double _Complex v = 0;
long double a, b, c, d, x, y;
int recalc, i, j;