Project

General

Profile

Actions

Bug #12161

closed

picl: argument to 'alloca' may be too large

Added by Toomas Soome over 1 year ago. Updated over 1 year ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
cmd - userland programs
Start date:
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:

Description

Build errors with gcc 9:

    In file included from picldevtree.c:40:
    picldevtree.c: In function 'get_first_reg_word':
    /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)
          |                   ^~~~~~~~~~~~~~~~~~~
    picldevtree.c:2962:11: note: in expansion of macro 'alloca'
     2962 |  regbuf = alloca(pinfo.piclinfo.size);
          |           ^~~~~~
    cc1: all warnings being treated as errors

Use heap allocations instead.

Testing done: build/install/boot.

Actions #1

Updated by Toomas Soome over 1 year ago

  • Description updated (diff)
Actions #2

Updated by Electric Monk over 1 year ago

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

git commit ce41cfb3d0fca3db767eb99d2edb4f5211465a99

commit  ce41cfb3d0fca3db767eb99d2edb4f5211465a99
Author: Toomas Soome <tsoome@me.com>
Date:   2020-01-12T08:51:27.000Z

    12161 picl: argument to 'alloca' may be too large
    Reviewed by: Andy Fiddaman <andy@omniosce.org>
    Reviewed by: Matthias Scheler <mscheler@tintri.com>
    Approved by: Dan McDonald <danmcd@joyent.com>

Actions

Also available in: Atom PDF