GCC Newspaper
NOVEMBER 30, 2026
Date
/
Architectures
Components
Topics
News & Policy
Other
testsuite

Avoid throwing errors in scan-symbol-common

Prevents testsuite crashes caused by errors when loading plugins for LTO object files.

This change prevents GCC’s testsuite from crashing when it encounters errors related to loading plugins for Link-Time Optimization (LTO) object files. Previously, if a required plugin (like liblto_plugin.so) was not found, it could cause a Tcl error to be thrown, aborting test execution. This patch ensures that such errors are handled gracefully, preventing testsuite integrity issues and allowing tests to complete even in environments where plugins might not be immediately available.

In Details

This patch addresses a potential Tcl error thrown by the scan-symbol test helper when processing LTO object files that require a plugin (e.g., liblto_plugin.so). If the plugin is not found, the exec command used by Tcl can throw an exception. The fix involves ensuring that such exceptions are caught and handled appropriately within the testsuite's execution flow, preventing test case abortion and maintaining test result integrity. This issue was previously masked by a bug in plugin discovery.

For Context
LTO
Link-Time Optimization. A compiler optimization technique that performs optimizations across multiple object files during the linking stage, rather than just within individual files.
plugin
A loadable module that extends the functionality of GCC, often used for specific target features or advanced optimization passes.
Tcl
Tool Command Language, a scripting language often used by testing frameworks like DejaGNU for test suite control.
nm
A standard Unix utility that lists symbols from object files.
Filed Under: testsuiteltobugfix