hc
2024-05-10 cde9070d9970eef1f7ec2360586c802a16230ad8
kernel/tools/perf/util/annotate.c
....@@ -1718,8 +1718,11 @@
17181718 perf_exe(tpath, sizeof(tpath));
17191719
17201720 bfdf = bfd_openr(tpath, NULL);
1721
- assert(bfdf);
1722
- assert(bfd_check_format(bfdf, bfd_object));
1721
+ if (bfdf == NULL)
1722
+ abort();
1723
+
1724
+ if (!bfd_check_format(bfdf, bfd_object))
1725
+ abort();
17231726
17241727 s = open_memstream(&buf, &buf_size);
17251728 if (!s) {
....@@ -1767,7 +1770,8 @@
17671770 #else
17681771 disassemble = disassembler(bfdf);
17691772 #endif
1770
- assert(disassemble);
1773
+ if (disassemble == NULL)
1774
+ abort();
17711775
17721776 fflush(s);
17731777 do {