Project

General

Profile

Actions

Bug #12158

closed

libdtrace: 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 errors with gcc 9:

    ../common/dt_options.c: In function 'dt_options_load':
    /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/dt_options.c:878:8: note: in expansion of macro 'alloca'
      878 |  dof = alloca(hdr.dofh_loadsz);
          |        ^~~~~~
    cc1: all warnings being treated as errors

Perhaps it is better to switch to heap...

Testing done: build/install/boot, use dtrace.

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 Feedback to Closed
  • % Done changed from 90 to 100

git commit b63b86d12b5ac4c5450c67c1222a35f224f5d0e4

commit  b63b86d12b5ac4c5450c67c1222a35f224f5d0e4
Author: Toomas Soome <tsoome@me.com>
Date:   2020-01-13T17:52:08.000Z

    12158 libdtrace: argument to 'alloca' may be too large
    Reviewed by: Matthias Scheler <mscheler@tintri.com>
    Approved by: Dan McDonald <danmcd@joyent.com>

Actions

Also available in: Atom PDF