Actions
Bug #12165
closedlp: argument to 'alloca' may be too large
Start date:
Due date:
% Done:
100%
Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:
Description
Build errors with gcc 9:
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
Allocate from heap instead.
Testing done: build/install/boot.
Updated by Electric Monk over 2 years ago
- Status changed from In Progress to Closed
- % Done changed from 90 to 100
git commit b666b5bebdde1067e2d0f2b91fd28a5243311a1a
commit b666b5bebdde1067e2d0f2b91fd28a5243311a1a Author: Toomas Soome <tsoome@me.com> Date: 2020-01-14T17:08:02.000Z 12165 lp: argument to 'alloca' may be too large Reviewed by: Matthias Scheler <mscheler@tintri.com> Approved by: Dan McDonald <danmcd@joyent.com>
Actions