This is an archive of the discontinued LLVM Phabricator instance.

[lldb] Stop generating swig bindings for SBLaunchInfo copy constructor
ClosedPublic

Authored by bulbazord on Feb 16 2023, 3:42 PM.

Details

Summary

Given the line

launch_info = lldb.SBLaunchInfo(None)

We see different behaviors across different versionf of swig. On some
older versions of swig (e.g. 3.0.2) this line fails because it attempts
to use the copy constructor and blows up with an invalid null reference.
On newer versions of swig, this is correctly routed to the constructor
taking a pointer.

Prior to generating the swig bindings with the API headers,
SBLaunchInfo's copy constructor was not exposed so we're effectively
going back to the old behavior anyway.

Diff Detail

Event Timeline

bulbazord created this revision.Feb 16 2023, 3:42 PM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 16 2023, 3:42 PM
bulbazord requested review of this revision.Feb 16 2023, 3:42 PM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 16 2023, 3:42 PM
pranavk accepted this revision.Feb 16 2023, 4:32 PM
pranavk added a subscriber: pranavk.

I tested this and this does fix the issue with older swig version. Thanks for working on it.

This revision is now accepted and ready to land.Feb 16 2023, 4:32 PM
mib accepted this revision.Feb 16 2023, 4:39 PM

Thanks for the quick fix.