This is an archive of the discontinued LLVM Phabricator instance.

[lldb] Add a cmake warning about the python/swig incompatibility
ClosedPublic

Authored by labath on Oct 7 2020, 7:42 AM.

Details

Summary

Raise awareness of the fact that some versions of swig and python (and
build types) just don't mix.

One day this will be a reason to require swig>=4.0, but this version is
too hot off the press right now..

Diff Detail

Event Timeline

labath created this revision.Oct 7 2020, 7:42 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 7 2020, 7:42 AM
Herald added a subscriber: mgorny. · View Herald Transcript
labath requested review of this revision.Oct 7 2020, 7:42 AM
This revision is now accepted and ready to land.Oct 7 2020, 10:15 AM

If I recall correctly, the non-debug builds still had the problem, they just didn't have the assertion that made it obvious.

If I recall correctly, the non-debug builds still had the problem, they just didn't have the assertion that made it obvious.

Is that problem only theoretical (like, "you shouldn't be doing that") or does it have some practical consequences (crashes, incorrect operation, etc.)?

I'm certain that it is a "theoretical" problem, but AFAICT it doesn't have any practical consequences. I've been running python-3.8+swig-3.0.12 for quite some time now any I didn't observe see any issues. And I know a lot of other people are running a similar combo too..

I think the "benignness" of this assertion failure was the reason it took so long to find/fix this bug.

If I recall correctly, the non-debug builds still had the problem, they just didn't have the assertion that made it obvious.

Is that problem only theoretical (like, "you shouldn't be doing that") or does it have some practical consequences (crashes, incorrect operation, etc.)?

My memory isn't that detailed. I think it was an argument being passed in as a single value but being referenced as though it was an array or list. Or vice versa.

labath added a comment.Oct 8 2020, 9:13 AM

If I recall correctly, the non-debug builds still had the problem, they just didn't have the assertion that made it obvious.

Is that problem only theoretical (like, "you shouldn't be doing that") or does it have some practical consequences (crashes, incorrect operation, etc.)?

My memory isn't that detailed. I think it was an argument being passed in as a single value but being referenced as though it was an array or list. Or vice versa.

If we're talking about the same thing then it's about passing None instead of an empty list/dictionary. And it seems this is benign because the way python checks for emptyness also returns zero for None values.

This revision was landed with ongoing or failed builds.Oct 8 2020, 9:43 AM
This revision was automatically updated to reflect the committed changes.