New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Should not use tst_brk after calling cleanup_ipc() #537
Comments
I guess that we can move the tst_wallclock_restore() before the call to the cleanup_ipc(), that should fix the problem as well. |
Yes I agree. |
But maybe adding some |
Sure, zeroing results after unmapping sounds good as well. Will you send a patch or should I do it? |
I'll send a patch later. Thanks for your answers. |
Yes, mailing list is preferred. |
Patch sent, email waiting for moderation. |
Patch arrived on the mailinglist: https://lists.linux.it/pipermail/ltp/2019-June/012292.html |
re-sent with corrections and missing Signed-off-by line. |
This fixes issue reported there: #537 Signed-off-by: Yann Sionneau <ysionneau@kalray.eu> Reviewed-by: Cyril Hrubis <chrubis@suse.cz>
Thanks! |
in the process of exiting, after having printed the Summary, do_cleanup() is called.
Which then calls cleanup_ipc(), which unmaps results. See
https://github.com/linux-test-project/ltp/blob/master/lib/tst_test.c#L924
https://github.com/linux-test-project/ltp/blob/master/lib/tst_test.c#L138
But then, afterward, tst_wallclock_restore() is called which itself can call tst_brk upon some syscall failure:
ltp/lib/tst_wallclock.c
Line 59 in 0410a51
This is wrong since tst_brk will call do_exit again and will try to de-reference results ( https://github.com/linux-test-project/ltp/blob/master/lib/tst_test.c#L593 ) and this leads to a segfault.
I experienced this segfault while running tests and for some reason the tst_clock_settime call failed.
output example:
Another solution would be to make
results
NULL upon unmapping it.The text was updated successfully, but these errors were encountered: