Assert the existence of original functions
The friendly folks at #musl again:
21:17 < dalias> if you init the pointers both from the ctor and the "lazy
init", then the assertion-failure/abort would happen during construction
(either your ctor or somebody else's ctor calling your functions)
21:17 < dalias> so the program would exit "before it even gets started"
21:17 < dalias> and this is not so bad
21:18 < dalias> normally i consider it really bad practice for a library to
abort the program
21:18 < dalias> but this happens during ctors, and there truely is no way to
proceed
21:18 < dalias> if you've already replaced the program's library functions
(open, etc.) with your copies, and then find that you can't actually supply
working ones
Showing
Please
register
or
sign in
to comment