From: Sergey Senozhatsky <sergey.senozhatsky at gmail.com>
To: powertop@lists.01.org
Subject: Re: [Powertop] segmentation fault when shutting
Date: Fri, 09 May 2014 13:06:40 +0300 [thread overview]
Message-ID: <20140509100640.GE937@swordfish> (raw)
In-Reply-To: alpine.DEB.2.10.1405090024520.17228@zertz.mathematik.uni-freiburg.de
[-- Attachment #1: Type: text/plain, Size: 1135 bytes --]
On (05/09/14 00:22), Martin Ziegler wrote:
> The bisection resulted in
>
> commit 5f5976f8b42e4e4717f2d573cf43cb87ccd88fa2
> Author: Dan Kalowsky <daniel.kalowsky(a)intel.com>
> Date: Tue Apr 29 15:55:31 2014 -0700
>
> Adding a clean_shutdown function
>
> Function is designed to be a on stop place to clean up
> the entire application at shutdown time.
>
> as the first bad commit.
>
thanks, Martin.
yes... well
a) clean_shutdown() calls close_display() which iterates tab_windows[tab_names[i]]
and deletes every tab_window. the problem is that prior to
close_display() main executes clear_tuning(), which [surprise surprise]
does `delete tune_window' since commit eb08d4480969c8e48347c7621bd96dc248ee2138
("Remove another memory leak") , whilst tab_windows[tab_names[i]] still holds
a pointer which we just secretly free()-d. so this is double free().
and it has no other option (and will never have) than to crash.
this obviously has not been tested before push.
b) there is no point in free()-ing memory which will be free()-d anyway,
because we exit() the program.
-ss
next reply other threads:[~2014-05-09 10:06 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-09 10:06 Sergey Senozhatsky [this message]
-- strict thread matches above, loose matches on Subject: below --
2014-05-14 20:16 [Powertop] segmentation fault when shutting Arjan van de Ven
2014-05-14 20:04 Alexandra Yates
2014-05-14 19:26 Kalowsky, Daniel
2014-05-12 23:22 Alexandra Yates
2014-05-08 22:22 Martin Ziegler
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140509100640.GE937@swordfish \
--to=powertop@lists.01.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.