Project

General

Profile

Bug #12165

Updated by Toomas Soome over 1 year ago

Build errors with gcc 9: 
 <pre> 
     In file included from ../common/service.c:38: 
     ../common/service.c: In function 'detailed_error': 
     /code/illumos-gate/proto/root_i386/usr/include/alloca.h:57:19: error: argument to 'alloca' may be too large [-Werror=alloca-larger-than=] 
        57 | #define alloca(x) __builtin_alloca(x) 
           |                     ^~~~~~~~~~~~~~~~~~~ 
     ../common/service.c:387:19: note: in expansion of macro 'alloca' 
       387 |      if ((message = alloca(size)) != NULL) 
           |                     ^~~~~~ 
    
     In file included from ../common/service.c:40: 
     ../common/service.c: In function 'detailed_error': 
     /code/illumos-gate/proto/root_i386/usr/include/alloca.h:57:19: error: argument to 'alloca' may be too large [-Werror=alloca-larger-than=] 
        57 | #define alloca(x) __builtin_alloca(x) 
           |                     ^~~~~~~~~~~~~~~~~~~ 
     ../common/service.c:562:19: note: in expansion of macro 'alloca' 
       562 |      if ((message = alloca(size)) != NULL) 
           |                     ^~~~~~ 
    
     ../common/service.c: In function 'detailed_error': 
     /code/illumos-gate/proto/root_i386/usr/include/alloca.h:57:19: error: argument to 'alloca' may be too large [-Werror=alloca-larger-than=] 
        57 | #define alloca(x) __builtin_alloca(x) 
           |                     ^~~~~~~~~~~~~~~~~~~ 
     ../common/service.c:292:19: note: in expansion of macro 'alloca' 
       292 |      if ((message = alloca(size)) != NULL) 
           |                     ^~~~~~ 
    
     In file included from service.c:34: 
     service.c: In function 'detailed_error': 
     /code/illumos-gate/proto/root_i386/usr/include/alloca.h:57:19: error: argument to 'alloca' may be too large [-Werror=alloca-larger-than=] 
        57 | #define alloca(x) __builtin_alloca(x) 
           |                     ^~~~~~~~~~~~~~~~~~~ 
     service.c:296:19: note: in expansion of macro 'alloca' 
       296 |      if ((message = alloca(size)) != NULL) 
           |                     ^~~~~~ 
     cc1: all warnings being treated as errors 
 </pre> 

 Allocate from heap instead. 

 Testing done: build/install/boot.

Back