Project

General

Profile

Actions

Bug #13789

closed

logadm: conf_scan() depens on non-zero value from stack

Added by Toomas Soome 9 months ago. Updated 9 months ago.

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

100%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:

Description

13761 did reveal an issue where we depend on vaiable having non-zero value. Since we only do set cp in timescan context, the if statements should check cp only with timescan.

testing done: Dan did tests on SmartOS where the issue was detected. "Triton head node `sdcadm update` was failing pre-this-fix, and passing after-this-fix."

dmake test in logadm source directory. Note there is still some bug in tests, I have run test twice with different results.

tsoome@beastie:/code/illumos-gate/usr/src/cmd/logadm$ dmake test
/usr/bin/perl -w ./tester `pwd`
Running conftest1...pass
Running conftest2...pass
Running globtest1...pass
Running globtest2...pass
Running kwtest1...pass
Running kwtest2...pass
Running luttest1...pass
Running optstest1...pass
Running optstest2...pass
Running logadmV1...pass
Running logadmV2...pass
Running logadmr...pass
Running logadmw...pass
Running logadm1...pass
Running logadm1c...pass
Running logadm2...pass
Running logadm3...pass
Running logadm4...pass
Running logadm5... CHECKTEST FAILURE
tester: ERROR: command "checktest" exit 1
results captured in file /tmp/logadmtest13999/checktest.out
  or use: tester -s logadm5 /code/illumos-gate/usr/src/cmd/logadm
  to do a fresh setup of this test.
*** Error code 1
dmake: Fatal error: Command failed for target `test'
Current working directory /code/illumos-gate/usr/src/cmd/logadm
tsoome@beastie:/code/illumos-gate/usr/src/cmd/logadm$ dmake test
/usr/bin/perl -w ./tester `pwd`
Running conftest1...pass
Running conftest2...pass
Running globtest1...pass
Running globtest2...pass
Running kwtest1...pass
Running kwtest2...pass
Running luttest1...pass
Running optstest1...pass
Running optstest2...pass
Running logadmV1...pass
Running logadmV2...pass
Running logadmr...pass
Running logadmw...pass
Running logadm1...pass
Running logadm1c...pass
Running logadm2...pass
Running logadm3...pass
Running logadm4...pass
Running logadm5...pass
Running logadm6...pass
Running logadm7...pass
Running logadm8...pass
Running logadm9...pass
Running logadm9d...pass
Running logadm10...pass
Running logadm11...pass
Running logadm12...pass
Running logadm13...pass
Running logadm14...pass
Running logadm15...pass
Running logadm16...pass
Running logadm17...pass
Running logadm18...pass
Running logadm19...pass
Running logadm20...pass
Running logadm21...pass
Running logadm22...pass
Running logadm23...pass
Running stderr1...pass
tsoome@beastie:/code/illumos-gate/usr/src/cmd/logadm$ 


Related issues

Related to illumos gate - Bug #13761: logadm: variable may be used uninitializedClosedToomas Soome

Actions
Actions #1

Updated by Toomas Soome 9 months ago

  • Related to Bug #13761: logadm: variable may be used uninitialized added
Actions #2

Updated by Electric Monk 9 months ago

  • Gerrit CR set to 1475
Actions #3

Updated by Toomas Soome 9 months ago

  • Description updated (diff)
Actions #4

Updated by Toomas Soome 9 months ago

  • Description updated (diff)
Actions #5

Updated by Electric Monk 9 months ago

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

git commit 509030e0926e72abde83b73397c61375773aaf9e

commit  509030e0926e72abde83b73397c61375773aaf9e
Author: Toomas Soome <tsoome@me.com>
Date:   2021-05-12T05:00:49.000Z

    13789 logadm: conf_scan() depens on non-zero value from stack
    Reviewed by: Dan McDonald <danmcd@joyent.com>
    Reviewed by: Andy Fiddaman <andy@omnios.org>
    Approved by: Robert Mustacchi <rm@fingolfin.org>

Actions

Also available in: Atom PDF