Skip to content
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

Block loading of incompatible IBinTools interface #979

Merged

Conversation

@peace-maker
Copy link
Contributor

peace-maker commented Apr 9, 2019

In #705 SourceMod received support for x64 binaries. The IBinTools interface was updated to call functions in 64bit binaries. The PassInfo struct's size was increased and the Create[V]Call() functions signatures changed, thus making the interface incompatible for consumers which were compiled against an earlier version.

IBinTools::IsVersionCompatible wasn't adjusted to that fact, so extensions compiled against pre SM 1.10 could request an IBinTools interface pointer, but crash when they try to use it.

This change makes requests to older interface versions invalid, thus letting RequestInterface return NULL for older extensions. It doesn't fix the backwards incompatibility, but at least makes the problem more blatant, so extensions can handle it themselves.

In #705 SourceMod received support for x64 binaries. The `IBinTools` interface was updated to call functions in 64bit binaries. The `PassInfo` struct's size was increased and the `Create(V)Call()` functions signatures changed, thus making the interface incompatible for consumers which were compiled against an earlier version.

`SMInterface::IsVersionCompatible` wasn't adjusted to that fact, so extensions compiled against pre SM 1.10 could request an `IBinTools` interface pointer, but crash when they try to use it.

This change makes requests to older interface versions invalid, thus letting `RequestInterface` return `NULL` for older extensions. It doesn't fix the backwards incompatibility, but at least makes the problem more blatant, so extensions can handle it themselves.
@Headline Headline added the Bug label Apr 10, 2019
@KyleSanderson

This comment has been minimized.

Copy link
Member

KyleSanderson commented Apr 11, 2019

Ah shoot, thank you very much.

@KyleSanderson KyleSanderson merged commit e3f4d23 into alliedmodders:master Apr 11, 2019
2 checks passed
2 checks passed
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@peace-maker peace-maker deleted the peace-maker:bintools_backwards_incomp branch Apr 12, 2019
@komashchenko komashchenko mentioned this pull request Apr 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.