forked from OSchip/llvm-project
				
			[lldb] Quick Fix: IRExecutionUnit check pointer before access it
Summary: Move checking pointer code block before accessing the pointer This caused lldb to crash when testing on Android Patch by Wanyi Ye! Differential Revision: https://reviews.llvm.org/D64434 llvm-svn: 365567
This commit is contained in:
		
							parent
							
								
									14a4495155
								
							
						
					
					
						commit
						269b9f940f
					
				| 
						 | 
				
			
			@ -285,9 +285,6 @@ void IRExecutionUnit::GetRunnableInfo(Status &error, lldb::addr_t &func_addr,
 | 
			
		|||
 | 
			
		||||
  m_execution_engine_up.reset(builder.create(target_machine));
 | 
			
		||||
 | 
			
		||||
  m_strip_underscore =
 | 
			
		||||
      (m_execution_engine_up->getDataLayout().getGlobalPrefix() == '_');
 | 
			
		||||
 | 
			
		||||
  if (!m_execution_engine_up) {
 | 
			
		||||
    error.SetErrorToGenericError();
 | 
			
		||||
    error.SetErrorStringWithFormat("Couldn't JIT the function: %s",
 | 
			
		||||
| 
						 | 
				
			
			@ -295,6 +292,9 @@ void IRExecutionUnit::GetRunnableInfo(Status &error, lldb::addr_t &func_addr,
 | 
			
		|||
    return;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  m_strip_underscore =
 | 
			
		||||
      (m_execution_engine_up->getDataLayout().getGlobalPrefix() == '_');
 | 
			
		||||
 | 
			
		||||
  class ObjectDumper : public llvm::ObjectCache {
 | 
			
		||||
  public:
 | 
			
		||||
    void notifyObjectCompiled(const llvm::Module *module,
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue