
$ /bin/bash -c 'echo qqq'
qqq
$ /lib/ld-linux.so.2 /bin/bash -c 'echo qqq'
/bin/bash: xmalloc: ../bash/variables.c:2176: cannot allocate 3 bytes (8192 bytes allocated)
為什麼會發生這種情況(zsh4、python 在這個用例中運作良好)?會不會是「prelink」造成的?
答案1
您可能嘗試在 amd64 架構上使用 32 位元函式庫呼叫 64 位元二進位檔案;就我而言:
ls -l /lib/ld-linux.so.2
/lib/ld-linux.so.2 -> /lib32/ld-linux.so.2