mirror of
https://git.FreeBSD.org/src.git
synced 2025-02-01 17:00:36 +00:00
Check __dso_handle is NULL in non-DSO objects. It should only be non-NULL
when accessed from a shared object. MFC with: r339738 Sponsored by: DARPA, AFRL
This commit is contained in:
parent
5201e0f110
commit
235130433a
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=339864
@ -119,11 +119,22 @@ ATF_TC_BODY(fini_array_test, tc)
|
||||
}
|
||||
}
|
||||
|
||||
extern void *__dso_handle;
|
||||
|
||||
ATF_TC_WITHOUT_HEAD(dso_handle_test);
|
||||
ATF_TC_BODY(dso_handle_test, tc)
|
||||
{
|
||||
|
||||
ATF_REQUIRE_MSG(__dso_handle == NULL,
|
||||
"Invalid __dso_handle in non-DSO");
|
||||
}
|
||||
|
||||
ATF_TP_ADD_TCS(tp)
|
||||
{
|
||||
|
||||
ATF_TP_ADD_TC(tp, dtors_test);
|
||||
ATF_TP_ADD_TC(tp, fini_array_test);
|
||||
ATF_TP_ADD_TC(tp, dso_handle_test);
|
||||
|
||||
return (atf_no_error());
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user