Project

General

Profile

Actions

Bug #7295

closed

powertop dumps core when -c, -d or -t flags are used

Added by Yuri Pankov almost 5 years ago. Updated almost 5 years ago.

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

100%

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

Description

# powertop -t1
Segmentation Fault (core dumped)

This used to work previously. The analysis from Richard Lowe:
---
We used to treat optarg as common via a copy relocation (ie, we'd copy
the contents into the executable at link-edit, then relocate everyone to
use our copy). Now we shadow. (You can confirm this via elfdump -y,
the 'C' flag)

This is because when libc is built by studio, optarg lands in .data,
initialized to "\0", so we move it to the executable common, and set up
a copy relocation to copy the initialized data at runtime, and then
relocate all references (including libc), to this copy in our bss.

When libc is built by gcc, optarg lands in .bss (automatically
initialized), none of this happens. The version in the executable
shadows the one in libc.

We decide how to do this at link-edit time. What matters is not the
libc we bind at runtime, but the libc that the link-editor sees at that
time. (ie, in this case, the one in 134, with optarg in .data)
---


Related issues

Has duplicate illumos gate - Bug #6003: powertop dumps core when given any argumentsClosed2015-06-13

Actions
Actions #1

Updated by Yuri Pankov almost 5 years ago

  • Description updated (diff)
Actions #2

Updated by Yuri Pankov almost 5 years ago

  • Has duplicate Bug #6003: powertop dumps core when given any arguments added
Actions #3

Updated by Electric Monk almost 5 years ago

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

git commit 37706db998822da2eb5ef6e8b2a5a3dfaec268fb

commit  37706db998822da2eb5ef6e8b2a5a3dfaec268fb
Author: Yuri Pankov <yuri.pankov@nexenta.com>
Date:   2016-08-16T23:43:59.000Z

    7295 powertop dumps core when -c, -d or -t flags are used
    Reviewed by: Gordon Ross <gordon.ross@nexenta.com>
    Reviewed by: Robert Mustacchi <rm@joyent.com>
    Reviewed by: Peter Tribble <peter.tribble@gmail.com>
    Approved by: Dan McDonald <danmcd@omniti.com>

Actions

Also available in: Atom PDF