From: Swati Sharma <swati2.sharma@intel.com>
To: igt-dev@lists.freedesktop.org
Subject: [igt-dev] [PATCH i-g-t] tests/kms_big_fb: Add assert for drm_intel_bufmgr and intel_batchbuffer before usage
Date: Thu, 8 Aug 2019 18:04:57 +0530 [thread overview]
Message-ID: <1565267697-19510-1-git-send-email-swati2.sharma@intel.com> (raw)
if drm_intel_bufmgr_gem_init() or intel_batchbuffer_alloc()
returns NULL, it leads to seg fault as below:
root@testrunner:/home/testrunner/swati/otc_gen_graphics-intel-gpu-tools#
./tests/kms_big_fb
IGT-Version: 1.24-g976db91 (x86_64) (Linux: 5.1.0-rc6+ x86_64)
Max driver framebuffer size 8192x8192
RAM: 2749 MiB, GPU address space: 134217728 MiB, GGTT mappable size: 256
MiB
Received signal SIGSEGV.
Stack trace:
#0 [fatal_sig_handler+0x77]
#1 [killpg+0x40]
#2 [drm_intel_bo_alloc+0x0]
#3 [intel_batchbuffer_reset+0x33]
#4 [intel_batchbuffer_alloc+0x34]
#5 [__real_main603+0x3e9]
#6 [main+0x23]
#7 [__libc_start_main+0xf0]
#8 [_start+0x29]
#9 [<unknown>+0x29]
Segmentation fault (core dumped)
To prevent this igt_assert() is added for both the functions.
Signed-off-by: Swati Sharma <swati2.sharma@intel.com>
---
tests/kms_big_fb.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/tests/kms_big_fb.c b/tests/kms_big_fb.c
index c3498c6..69061a6 100644
--- a/tests/kms_big_fb.c
+++ b/tests/kms_big_fb.c
@@ -648,7 +648,10 @@ igt_main
data.render_copy = igt_get_render_copyfunc(data.devid);
data.bufmgr = drm_intel_bufmgr_gem_init(data.drm_fd, 4096);
+ igt_assert(data.bufmgr);
+
data.batch = intel_batchbuffer_alloc(data.bufmgr, data.devid);
+ igt_assert(data.batch);
}
/*
--
1.9.1
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
next reply other threads:[~2019-08-08 12:43 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-08 12:34 Swati Sharma [this message]
2019-08-08 14:04 ` [igt-dev] ✓ Fi.CI.BAT: success for tests/kms_big_fb: Add assert for drm_intel_bufmgr and intel_batchbuffer before usage Patchwork
2019-08-08 22:59 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
2019-08-13 10:28 ` [igt-dev] [PATCH i-g-t] " Ser, Simon
2019-08-13 10:38 ` Chris Wilson
2019-09-03 20:10 ` Sharma, Swati2
2019-09-04 9:35 ` Petri Latvala
2019-09-05 20:00 ` Sharma, Swati2
2019-09-06 10:02 ` Petri Latvala
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=1565267697-19510-1-git-send-email-swati2.sharma@intel.com \
--to=swati2.sharma@intel.com \
--cc=igt-dev@lists.freedesktop.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox