runshell: Unset LD_PRELOAD
Preloaded libraries from the host system may not get along with the bundled linker. This was observed by users in termux: ERROR: ld.so: object '/data/data/com.termux/files/usr/lib/libtermux-exec.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored. Bad system call But it could also affect more usual systems; the preloaded library might rely on symbols from the host libc that are not available or have the wrong versions in the bundled libc. Unsetting LD_PRELOAD entirely seems safest.
This commit is contained in:
		
					parent
					
						
							
								3753c07204
							
						
					
				
			
			
				commit
				
					
						dd7ab91f97
					
				
			
		
					 2 changed files with 6 additions and 0 deletions
				
			
		| 
						 | 
					@ -12,6 +12,8 @@ git-annex (6.20180410) UNRELEASED; urgency=medium
 | 
				
			||||||
  * Fix build with yesod 1.6.
 | 
					  * Fix build with yesod 1.6.
 | 
				
			||||||
  * Clean up some build warnings with newer versions of ghc and haskell
 | 
					  * Clean up some build warnings with newer versions of ghc and haskell
 | 
				
			||||||
    libraries.
 | 
					    libraries.
 | 
				
			||||||
 | 
					  * runshell: Unset LD_PRELOAD since preloaded libraries from the host
 | 
				
			||||||
 | 
					    system may not get along with the bundled linker.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 -- Joey Hess <id@joeyh.name>  Mon, 09 Apr 2018 14:03:28 -0400
 | 
					 -- Joey Hess <id@joeyh.name>  Mon, 09 Apr 2018 14:03:28 -0400
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -121,6 +121,10 @@ export ORIG_LOCPATH
 | 
				
			||||||
LOCPATH="$base/locales"
 | 
					LOCPATH="$base/locales"
 | 
				
			||||||
export LOCPATH
 | 
					export LOCPATH
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# LD_PRELOAD may interact badly with the bundled libc and other libraries,
 | 
				
			||||||
 | 
					# which may have a different subarchitecture than the preloaded library.
 | 
				
			||||||
 | 
					unset LD_PRELOAD
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Generate locale definition files for the locales in use,
 | 
					# Generate locale definition files for the locales in use,
 | 
				
			||||||
# using the localedef and locale files from the bundle.
 | 
					# using the localedef and locale files from the bundle.
 | 
				
			||||||
# Currently only utf-8 locales are handled.
 | 
					# Currently only utf-8 locales are handled.
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue