Project

General

Profile

Bug #8498

ficl: variable 'count' might be clobbered by 'longjmp' or 'vfork'

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

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

100%

Estimated time:
Difficulty:
Bite-size
Tags:

Description

Issue revealed by gcc 7 build:

    /code/illumos-gate/usr/src/common/ficl/vm.c:255:6: error: variable 'count' might be clobbered by 'longjmp' or 'vfork' [-Werror=clobbered]
      int count;
          ^~~~~
    cc1: all warnings being treated as errors

And after adding 'volatile' to count, we will get error from gcc 4.4.4:

+ /opt/gcc/4.4.4/bin/gcc -fident -finline -fno-inline-functions -fno-builtin -fno-asm -fdiagnostics-show-option -nodefaultlibs -D__sun -O -m32 -fpic -Wall -Wextra -Werror -Wno-missing-braces -Wno-sign-compare -Wno-unknown-pragmas -Wno-unused-parameter -Wno-missing-field-initializers -Wno-array-bounds -Wno-unused -Wno-empty-body -std=gnu99 -fno-inline-small-functions -fno-inline-functions-called-once -fno-ipa-cp -gdwarf-2 -std=gnu99 -DTEXT_DOMAIN="SUNW_OST_OSLIB" -D_TS_ERRNO -I/code/illumos-gate/proto/root_i386/usr/include -I.. -I/code/illumos-gate/usr/src/common/ficl -D_LARGEFILE64_SOURCE=1 -DPIC -D_REENTRANT -c -o pics/vm.o /code/illumos-gate/usr/src/common/ficl/vm.c 
cc1: warnings being treated as errors
/code/illumos-gate/usr/src/common/ficl/vm.c: In function 'ficlVmInnerLoop':
/code/illumos-gate/usr/src/common/ficl/vm.c:239: error: argument 'fw' might be clobbered by 'longjmp' or 'vfork' [-Wclobbered]
*** Error code 1

History

#1

Updated by Toomas Soome almost 2 years ago

  • Description updated (diff)
#2

Updated by Electric Monk over 1 year ago

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

git commit 471b551f6042e421bfe941f593337a8a5b2a7a7d

commit  471b551f6042e421bfe941f593337a8a5b2a7a7d
Author: Toomas Soome <tsoome@me.com>
Date:   2018-02-05T15:19:08.000Z

    8498 ficl: variable 'count' might be clobbered by 'longjmp' or 'vfork'
    Reviewed by: Yuri Pankov <yuripv@gmx.com>
    Reviewed by: Vitaliy Gusev <gusev.vitaliy@icloud.com>
    Reviewed by: Marcel Telka <marcel@telka.sk>
    Approved by: Dan McDonald <danmcd@joyent.com>

Also available in: Atom PDF