Skip to content

Fix IForward definition#2457

Open
Kenzzer wants to merge 2 commits into
masterfrom
k/iforward_fix
Open

Fix IForward definition#2457
Kenzzer wants to merge 2 commits into
masterfrom
k/iforward_fix

Conversation

@Kenzzer
Copy link
Copy Markdown
Member

@Kenzzer Kenzzer commented May 12, 2026

Fixes #2456

This bug was known for a while (9th of April 2026), but unfortunately the lack of issue on the tracker made me forget how urgent it was.
https://discord.com/channels/335290997317697536/335290997317697536/1491812815860797532

This PR hopefully fixes vtable shift bugs with IForward forever. I have removed the inheritance of ICallable by IForward, if any extension out there relied on the ability to mix IForward(s) with ICallable(s) this is unfortunately permanently broken. However I am highly doubtful this is a feature that was desired by extensions.

An alternative fix to this PR would be to have sourcepawn's ICallable be turned into a new class ICallable2. I don't think I need to argue why this is a bad solution and avoided it.

One more fix would be to find a method so that gcc,clang,msvc doesn't merge the vtable of IForward with ICallable. However even if that is possible, this won't help already compiled extensions. So this fix is a no go as well.

@Kenzzer Kenzzer self-assigned this May 12, 2026
@Kenzzer
Copy link
Copy Markdown
Member Author

Kenzzer commented May 12, 2026

Disclaimer I have not tested the following changes, everything was done in the web editor. We desperately need a test suite for this sort of things.

@dvander
Copy link
Copy Markdown
Member

dvander commented May 12, 2026 via email

@dvander
Copy link
Copy Markdown
Member

dvander commented May 13, 2026

As noted on IRCDiscord, the fix has to be upstream in SP since it also pushed the IPluginFunction vtables around.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: New virtual PushInt64 silently breaks every extension compiled before this

2 participants