Project

General

Profile

Actions

Bug #6003

closed

powertop dumps core when given any arguments

Added by Peter Tribble almost 7 years ago. Updated almost 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Start date:
2015-06-13
Due date:
% Done:

0%

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

Description

A reported by Michael Rasmussen on the omnios mailing list:

root@nas:/root# powertop -d 1
Segmentation Fault (core dumped)
root@nas:/root# powertop -t 10
Segmentation Fault (core dumped)
root@nas:/root# powertop -d 1 -v
Segmentation Fault (core dumped)
root@nas:/root# powertop -c 0
Segmentation Fault (core dumped)

On inspection, the problem appears to be that powertop.c has

char *optarg;

which masks the global definition that should be pulled in from getopt.h; the wrong
optarg then gets passed up into strtod leading to the core dump.

The fix would appear to be very simple - remove this line.


Related issues

Is duplicate of illumos gate - Bug #7295: powertop dumps core when -c, -d or -t flags are usedClosedYuri Pankov2016-08-11

Actions
Actions #1

Updated by Yuri Pankov almost 6 years ago

  • Status changed from New to Closed

Duplicates #7295 (should have been the other way, but, ugh, #7295 now has a bit of analysis).

Actions #2

Updated by Yuri Pankov almost 6 years ago

  • Is duplicate of Bug #7295: powertop dumps core when -c, -d or -t flags are used added
Actions

Also available in: Atom PDF