* [LTP] [PATCH] lib/tst_test.c: fix Segmentation fault in tst_vbrk_
@ 2016-06-16 7:52 Xiao Yang
2016-06-16 8:49 ` Jan Stancek
0 siblings, 1 reply; 2+ messages in thread
From: Xiao Yang @ 2016-06-16 7:52 UTC (permalink / raw)
To: ltp
We can't allocate resources to results pointer before checking
kernel version, so do_exit() will fail if we print results pointer.
Signed-off-by: Xiao Yang <yangx.jy@cn.fujitsu.com>
---
lib/tst_test.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/tst_test.c b/lib/tst_test.c
index c560727..68791cb 100644
--- a/lib/tst_test.c
+++ b/lib/tst_test.c
@@ -237,7 +237,7 @@ void tst_vbrk_(const char *file, const int lineno, int ttype,
do_test_cleanup();
if (getpid() == lib_pid)
- do_exit(TTYPE_RESULT(ttype));
+ do_cleanup();
exit(TTYPE_RESULT(ttype));
}
--
1.8.3.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [LTP] [PATCH] lib/tst_test.c: fix Segmentation fault in tst_vbrk_
2016-06-16 7:52 [LTP] [PATCH] lib/tst_test.c: fix Segmentation fault in tst_vbrk_ Xiao Yang
@ 2016-06-16 8:49 ` Jan Stancek
0 siblings, 0 replies; 2+ messages in thread
From: Jan Stancek @ 2016-06-16 8:49 UTC (permalink / raw)
To: ltp
----- Original Message -----
> From: "Xiao Yang" <yangx.jy@cn.fujitsu.com>
> To: ltp@lists.linux.it
> Sent: Thursday, 16 June, 2016 9:52:04 AM
> Subject: [LTP] [PATCH] lib/tst_test.c: fix Segmentation fault in tst_vbrk_
>
> We can't allocate resources to results pointer before checking
> kernel version, so do_exit() will fail if we print results pointer.
>
> Signed-off-by: Xiao Yang <yangx.jy@cn.fujitsu.com>
Thanks, I pushed a patch that fixes do_exit() instead. So we
preserve do_exit as a single place for library process to exit.
Regards,
Jan
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-06-16 8:49 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-06-16 7:52 [LTP] [PATCH] lib/tst_test.c: fix Segmentation fault in tst_vbrk_ Xiao Yang
2016-06-16 8:49 ` Jan Stancek
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox