All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Oberparleiter <oberpar@linux.ibm.com>
To: Luis Henriques <lhenriques@suse.de>
Cc: linux-kernel@vger.kernel.org
Subject: Re: gcov: NULL pointer dereference with gcc 9.3.1
Date: Wed, 2 Jun 2021 14:35:31 +0200	[thread overview]
Message-ID: <0a013450-75eb-de2c-f90a-3df193800cea@linux.ibm.com> (raw)
In-Reply-To: <YLZYwgs5hyzFZMlw@suse.de>

On 01.06.2021 17:56, Luis Henriques wrote:
> Hi!
> 
> Maybe this is a known (gcc?) issue, but I'm seeing a NULL pointer splat if
> I instrument my kernel (or a module, more specifically) using gcc 9.3.1.
> 
> It looks like, during initialization in __gcov_init(), gcov_info struct is
> invalid: the filename seems to be correct but ->function is NULL and
> ->n_functions contains garbage.

Thanks for reporting this issue. The symptoms you're seeing look similar
to those that occur when the struct gcov_info layout emitted by GCC does
not match the one used by the kernel. In particular a change in the
GCOV_COUNTER value can cause this behavior.

I've checked upstream GCC 9.3.1 and it seems to match what is used by
the kernel for that GCC version. Could you provide the exact version of
the compiler you are using? Both 'gcc --version' output and the GCC
package version should help. Also what architecture are you seeing this on?


Regards,
  Peter Oberparleiter

-- 
Peter Oberparleiter
Linux on Z Development - IBM Germany

  parent reply	other threads:[~2021-06-02 12:35 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-01 15:56 gcov: NULL pointer dereference with gcc 9.3.1 Luis Henriques
2021-06-02 10:24 ` [RFC PATCH] gcov: add basic gcov_info validation to gcov initialization Luis Henriques
2021-06-07  9:59   ` Peter Oberparleiter
2021-06-07 10:48     ` Luis Henriques
2021-06-02 12:35 ` Peter Oberparleiter [this message]
2021-06-02 14:22   ` gcov: NULL pointer dereference with gcc 9.3.1 Luis Henriques
2021-06-07 14:32     ` Peter Oberparleiter
2021-06-08 12:46       ` Luis Henriques

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=0a013450-75eb-de2c-f90a-3df193800cea@linux.ibm.com \
    --to=oberpar@linux.ibm.com \
    --cc=lhenriques@suse.de \
    --cc=linux-kernel@vger.kernel.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.