Stubs in spec files

Stefan Dösinger stefandoesinger at gmail.com
Wed Feb 1 15:08:11 CST 2017


Am 2017-02-01 um 20:37 schrieb Zebediah Figura:
> My question, then, is—is there any purpose of the stub lines besides to
> directly call __wine_spec_unimplemented_stub, or any other reason why
> this proposal would be detrimental?
I am not an expert on .spec files and I am not sure if I understand your
proposal correctly.

If you remove the stub lines GetProcAddress on the symbol will return
NULL, and applications might take a different codepath based on that.
Also the crash from calling a stub is fairly specific ("Unimplemented
function XXX called") while the one from a nonexistent one that is
resolved on library load is more generic (Access violation). You have
the load-time warning, but you don't know if that warning has a relation
to a crash much later on. Things are even trickier if the program has a
signal handler for access violations.

Maybe we need a different kind of stub for data exports that point to a
X byte large block filled with 0xdeadcode?


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: OpenPGP digital signature
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20170201/a57c2d32/attachment.sig>


More information about the wine-devel mailing list