Skip to content
Commit 4112b473 authored by Jan Kratochvil's avatar Jan Kratochvil
Browse files

[lldb] Fix crash on SBCommandReturnObject & assignment

I was writing an SB API client and it was crashing on:
	bool DoExecute(SBDebugger dbg, char **command, SBCommandReturnObject &result) {
	  result = subcommand(dbg, "help");

That is because SBCommandReturnObject &result gets initialized inside LLDB by:
	bool DoExecute(Args &command, CommandReturnObject &result) override {
	  // std::unique_ptr gets initialized here from `&result`!!!
	  SBCommandReturnObject sb_return(&result);
	  DoExecute(...);
	  sb_return.Release();

Differential revision: https://reviews.llvm.org/D67589

llvm-svn: 373775
parent f7766b1e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment