Project

General

Profile

Actions

Bug #12160

closed

libdiskstatus: argument to 'alloca' may be too large

Added by Toomas Soome over 2 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
lib - userland libraries
Start date:
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:

Description

Build error with gcc 9:

    In file included from ../common/ds_scsi_uscsi.c:46:
    ../common/ds_scsi_uscsi.c: In function 'uscsi_log_sense':
    /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/ds_scsi_uscsi.c:1618:18: note: in expansion of macro 'alloca'
     1618 |  log_sense_buf = alloca((uint_t)page_size);
          |                  ^~~~~~
    cc1: all warnings being treated as errors

switch to heap instead.

Testing done: build/install/boot

Actions #1

Updated by Toomas Soome over 2 years ago

  • Description updated (diff)
Actions #2

Updated by Electric Monk over 2 years ago

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

git commit 77ac0eaaa1298f1119c62575dcdb2003d56e0994

commit  77ac0eaaa1298f1119c62575dcdb2003d56e0994
Author: Toomas Soome <tsoome@me.com>
Date:   2020-01-09T08:31:39.000Z

    12160 libdiskstatus: argument to 'alloca' may be too large
    Reviewed by: C Fraire <cfraire@me.com>
    Approved by: Dan McDonald <danmcd@joyent.com>

Actions

Also available in: Atom PDF