diff mbox

[committed] Fix OMP_DISPLAY_ENV without {,G}OMP_STACKSIZE

Message ID 20170330203024.GM17461@tucnak
State New
Headers show

Commit Message

Jakub Jelinek March 30, 2017, 8:30 p.m. UTC
Hi!

We print an uninitialized variable if OMP_DISPLAY_ENV=true is
in the environment, but {,G}OMP_STACKSIZE is not.

Fixed thusly, bootstrapped/regtested on x86_64-linux and i686-linux,
committed to trunk.

2017-03-30  Jakub Jelinek  <jakub@redhat.com>

	* env.c (initialize_env): Initialize stacksize to 0.


	Jakub
diff mbox

Patch

--- libgomp/env.c.jj	2017-01-01 12:45:52.000000000 +0100
+++ libgomp/env.c	2017-03-30 16:07:29.800247913 +0200
@@ -1187,7 +1187,7 @@  handle_omp_display_env (unsigned long st
 static void __attribute__((constructor))
 initialize_env (void)
 {
-  unsigned long thread_limit_var, stacksize;
+  unsigned long thread_limit_var, stacksize = 0;
   int wait_policy;
 
   /* Do a compile time check that mkomp_h.pl did good job.  */