Project

General

Profile

Actions

Bug #12155

closed

libdemangle: variable 'result' might be clobbered by 'longjmp' or 'vfork'

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

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

100%

Estimated time:
Difficulty:
Bite-size
Tags:
Gerrit CR:

Description

Build error with gcc 9:

    ../common/cxx.c: In function 'cpp_demangle':
    ../common/cxx.c:170:8: error: variable 'result' might be clobbered by 'longjmp' or 'vfork' [-Werror=clobbered]
      170 |  char *result = NULL;
          |        ^~~~~~
    cc1: all warnings being treated as errors

Mark it volatile should do there.

Actions #1

Updated by Electric Monk about 2 years ago

  • Status changed from In Progress to Closed

git commit 5eadbc30703231f9c4bae46b75a14b0abf05268c

commit  5eadbc30703231f9c4bae46b75a14b0abf05268c
Author: Toomas Soome <tsoome@me.com>
Date:   2020-04-27T17:51:09.000Z

    12155 libdemangle: variable 'result' might be clobbered by 'longjmp' or 'vfork'
    Reviewed by: John Levon <john.levon@joyent.com>
    Reviewed by: Jason King <jason.king@joyent.com>
    Approved by: Dan McDonald <danmcd@joyent.com>

Actions

Also available in: Atom PDF