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
Member

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 alliedmodders#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 general bugs; can be anything label Apr 10, 2019
@KyleSanderson
Copy link
Member

Ah shoot, thank you very much.

@KyleSanderson KyleSanderson merged commit e3f4d23 into alliedmodders:master Apr 11, 2019
@peace-maker peace-maker deleted the bintools_backwards_incomp branch April 12, 2019 10:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug general bugs; can be anything
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants