[all-commits] [llvm/llvm-project] d29fdf: [LTO] Avoid assert fail on failed pass plugin load...
Joel E. Denny via All-commits
all-commits at lists.llvm.org
Wed Jun 26 11:51:46 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: d29fdfbc4e3b42e9ee0295049493ba7b1471772f
https://github.com/llvm/llvm-project/commit/d29fdfbc4e3b42e9ee0295049493ba7b1471772f
Author: Joel E. Denny <jdenny.ornl at gmail.com>
Date: 2024-06-26 (Wed, 26 Jun 2024)
Changed paths:
M llvm/lib/LTO/LTOBackend.cpp
M llvm/test/Feature/load_plugin_error.ll
Log Message:
-----------
[LTO] Avoid assert fail on failed pass plugin load (#96691)
Without this patch, passing -load-pass-plugin=nonexistent.so to
llvm-lto2 produces a backtrace because LTOBackend.cpp does not handle
the error correctly:
```
Failed to load passes from 'nonexistant.so'. Request ignored.
Expected<T> must be checked before access or destruction.
Unchecked Expected<T> contained error:
Could not load library 'nonexistant.so': nonexistant.so: cannot open shared object file: No such file or directoryPLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
```
Any tool using `lto::Config::PassPlugins` should suffer similarly.
Based on the message "Request ignored" and the continue statement, the
intention was apparently to continue on failure to load a plugin.
However, no one appears to rely on that behavior now given that it
crashes instead, and terminating is consistent with opt.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list