lib/tst_test.c: fix Segmentation fault in tst_vbrk_
PATCH 1/1 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 <[email protected]>
--- lib/tst_test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
lib/tst_test.c +1 -1
@@ -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)); }
Signature · 1 line
1.8.3.1
PATCH 1/1 lib/tst_test.c: fix Segmentation fault in tst_vbrk_
----- Original Message -----
Quoted 9 lines
From: "Xiao Yang" <[email protected]>
To: [email protected]
Sent: Thursday, 16 June, 2016 9:52:04 AM
Subject: [LTP] [PATCH]lib/tst_test.c: fix Segmentation fault intst_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 <[email protected]>
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