linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Namhyung Kim <namhyung@kernel.org>
To: kernel test robot <oliver.sang@intel.com>
Cc: "Ian Rogers" <irogers@google.com>,
	oe-lkp@lists.linux.dev, lkp@intel.com,
	linux-kernel@vger.kernel.org,
	"Arnaldo Carvalho de Melo" <acme@redhat.com>,
	"Adrian Hunter" <adrian.hunter@intel.com>,
	"Ahelenia Ziemiańska" <nabijaczleweli@nabijaczleweli.xyz>,
	"Alexander Shishkin" <alexander.shishkin@linux.intel.com>,
	"Andi Kleen" <ak@linux.intel.com>,
	"Athira Rajeev" <atrajeev@linux.vnet.ibm.com>,
	"Ben Gainey" <ben.gainey@arm.com>,
	"Changbin Du" <changbin.du@huawei.com>,
	"Chengen Du" <chengen.du@canonical.com>,
	"Colin Ian King" <colin.i.king@gmail.com>,
	"Dima Kogan" <dima@secretsauce.net>,
	"Ilkka Koskinen" <ilkka@os.amperecomputing.com>,
	"Ingo Molnar" <mingo@redhat.com>,
	"James Clark" <james.clark@arm.com>,
	"Jiri Olsa" <jolsa@kernel.org>,
	"K Prateek Nayak" <kprateek.nayak@amd.com>,
	"Kan Liang" <kan.liang@linux.intel.com>,
	"Leo Yan" <leo.yan@linux.dev>, "Li Dong" <lidong@vivo.com>,
	"Mark Rutland" <mark.rutland@arm.com>,
	"Masami Hiramatsu" <mhiramat@kernel.org>,
	"Paran Lee" <p4ranlee@gmail.com>,
	"Peter Zijlstra" <peterz@infradead.org>,
	"Song Liu" <song@kernel.org>,
	"Sun Haiyong" <sunhaiyong@loongson.cn>,
	"Thomas Richter" <tmricht@linux.ibm.com>,
	"Tiezhu Yang" <yangtiezhu@loongson.cn>,
	"Yanteng Si" <siyanteng@loongson.cn>,
	zhaimingbing <zhaimingbing@cmss.chinamobile.com>,
	linux-perf-users@vger.kernel.org
Subject: Re: [linus:master] [perf dsos] 7a9418cf7f: util/dsos.c:184:8: runtime error: null pointer passed as argument 2, which is declared to never be null
Date: Wed, 19 Jun 2024 14:37:13 -0400	[thread overview]
Message-ID: <CAM9d7cjzuJCGXLe_5Jzmcu2iiRtb07WwATnrz01sR7g++b6Frg@mail.gmail.com> (raw)
In-Reply-To: <202406180932.84be448c-oliver.sang@intel.com>

Hello,

On Mon, Jun 17, 2024 at 9:45 PM kernel test robot <oliver.sang@intel.com> wrote:
>
>
>
> Hello,
>
> kernel test robot noticed "util/dsos.c:184:8: runtime error: null pointer passed as argument 2, which is declared to never be null" on:
>
> commit: 7a9418cf7f05a74cbc9d4c750ee1bfddaa11f121 ("perf dsos: Switch hand crafted code to bsearch()")
> https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git master
>
> [test failed on linus/master      a3e18a540541325a8c8848171f71e0d45ad30b2c]
> [test failed on linux-next/master 6906a84c482f098d31486df8dc98cead21cce2d0]
>
>
>
> the issue can be reproduced by below commands:
>
> $ sudo make WERROR=0 ARCH= DEBUG=1 EXTRA_CFLAGS='-fno-omit-frame-pointer -fsanitize=undefined -fsanitize=address'
> $ sudo ./perf record  -e 'cpu/branch-instructions/' -- sleep 1
> util/dsos.c:184:8: runtime error: null pointer passed as argument 2, which is declared to never be null

It seems we need to return early from the function when
dsos->dsos is NULL since there's nothing to search.

Thanks,
Namhyung

>
>
>
> If you fix the issue in a separate patch/commit (i.e. not just a new version of
> the same patch/commit), kindly add following tags
> | Reported-by: kernel test robot <oliver.sang@intel.com>
> | Closes: https://lore.kernel.org/oe-lkp/202406180932.84be448c-oliver.sang@intel.com
>
>
>
> --
> 0-DAY CI Kernel Test Service
> https://github.com/intel/lkp-tests/wiki
>
>

      reply	other threads:[~2024-06-19 18:37 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-18  1:44 [linus:master] [perf dsos] 7a9418cf7f: util/dsos.c:184:8: runtime error: null pointer passed as argument 2, which is declared to never be null kernel test robot
2024-06-19 18:37 ` Namhyung Kim [this message]

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=CAM9d7cjzuJCGXLe_5Jzmcu2iiRtb07WwATnrz01sR7g++b6Frg@mail.gmail.com \
    --to=namhyung@kernel.org \
    --cc=acme@redhat.com \
    --cc=adrian.hunter@intel.com \
    --cc=ak@linux.intel.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=atrajeev@linux.vnet.ibm.com \
    --cc=ben.gainey@arm.com \
    --cc=changbin.du@huawei.com \
    --cc=chengen.du@canonical.com \
    --cc=colin.i.king@gmail.com \
    --cc=dima@secretsauce.net \
    --cc=ilkka@os.amperecomputing.com \
    --cc=irogers@google.com \
    --cc=james.clark@arm.com \
    --cc=jolsa@kernel.org \
    --cc=kan.liang@linux.intel.com \
    --cc=kprateek.nayak@amd.com \
    --cc=leo.yan@linux.dev \
    --cc=lidong@vivo.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=mark.rutland@arm.com \
    --cc=mhiramat@kernel.org \
    --cc=mingo@redhat.com \
    --cc=nabijaczleweli@nabijaczleweli.xyz \
    --cc=oe-lkp@lists.linux.dev \
    --cc=oliver.sang@intel.com \
    --cc=p4ranlee@gmail.com \
    --cc=peterz@infradead.org \
    --cc=siyanteng@loongson.cn \
    --cc=song@kernel.org \
    --cc=sunhaiyong@loongson.cn \
    --cc=tmricht@linux.ibm.com \
    --cc=yangtiezhu@loongson.cn \
    --cc=zhaimingbing@cmss.chinamobile.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).