You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm writing my own dnf5 search command, and I've discovered that if you do anything not implemented by the libdnf5 library, such as using QueryCmp_REGEX, the code throws a C++ exception that is not translated into a python exception, and the python interpreter simply crashes, usually with a segfault and core dump.
I've attached a small test case, but this is only one example of dozens I've run across just trying to inspect SWIG objects that, clearly, I'm not supposed to look at. Even aside from that, there are filters that support some flags and not others, e.g. filter_arch throws an exception if you use QueryCmp_CONTAINS, but other filters accept it. The hapless python programmer has absolutely no way of knowing which filters tolerate which flags without digging through the source code.
I can work around these problems, but is there any chance these exceptions could be made to translate into the respective language bindings in a more fault-tolerant way?
Uh oh!
There was an error while loading. Please reload this page.
I'm writing my own dnf5
search
command, and I've discovered that if you do anything not implemented by the libdnf5 library, such as usingQueryCmp_REGEX
, the code throws a C++ exception that is not translated into a python exception, and the python interpreter simply crashes, usually with a segfault and core dump.I've attached a small test case, but this is only one example of dozens I've run across just trying to inspect SWIG objects that, clearly, I'm not supposed to look at. Even aside from that, there are filters that support some flags and not others, e.g.
filter_arch
throws an exception if you useQueryCmp_CONTAINS
, but other filters accept it. The hapless python programmer has absolutely no way of knowing which filters tolerate which flags without digging through the source code.I can work around these problems, but is there any chance these exceptions could be made to translate into the respective language bindings in a more fault-tolerant way?
example.py.txt
The text was updated successfully, but these errors were encountered: