EASY: Remove unnecessary BCProviderFromSrc.h include from RuntimeModule.cpp #1866
+39
−2
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary:
This fixes a link error with GCC 16 in Release mode. GCC 16's speculative
devirtualization optimization generates comparison code against all known
derived class vtables when it sees a virtual call through a base pointer.
RuntimeModule.cpp is part of the lean build (VM without compiler), but it
was including BCProviderFromSrc.h even though it doesn't use anything from
that header. When GCC sees virtual calls through BCProviderBase*, it
speculatively generates code paths for BCProviderFromSrc (since the class
is visible via the include). This instantiates the inline virtual methods
from BCProviderFromSrc, which reference BytecodeModule::getFunction() -
a symbol that doesn't exist in the lean build.
The fix is simply to remove the unnecessary include. RuntimeModule.cpp
only uses BCProviderBase (via bcProvider_) and BCProviderFromBuffer
(for sizeof), both of which are available through BCProvider.h, which
is already included via RuntimeModule.h.
Differential Revision: D89755964