Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top
$ /bin/bash -c 'echo qqq'
$ /lib/ /bin/bash -c 'echo qqq'
/bin/bash: xmalloc: ../bash/variables.c:2176: cannot allocate 3 bytes (8192 bytes allocated)

Why this happens (zsh4, python works well in this use case)? Can it be caused by "prelink"?

share|improve this question
Do you mean LD_PRELINK? – djf Aug 15 '12 at 21:38
No, prelink (8) - prelink ELF shared libraries and binaries to speed up startup time – Vi. Aug 15 '12 at 22:41

You may be trying to call 64-bit binary with 32-bit lib on amd64 architecture; in my case:

ls -l /lib/
/lib/ -> /lib32/
share|improve this answer
/lib/ -> i386-linux-gnu/ – Vi. Aug 15 '12 at 22:41
@Vi.: and the output of file /bin/bash is... ? – barti_ddu Aug 16 '12 at 15:30
/bin/bash: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.26, BuildID[sha1]=0xb9a715b5137f1d8d532103e0f7f7a288039bf7f7, stripped – Vi. Aug 16 '12 at 18:27
@Vi.: hmm, i was pretty sure, that you've mixed 32/64 bit components; what does strace -i /lib/ /bin/bash -c 'echo qqq' produce? – barti_ddu Aug 16 '12 at 18:56
@Vi.: nothing criminal except the crash itself :/ however, this ( report may be related – barti_ddu Aug 16 '12 at 20:07
up vote 1 down vote accepted

As hinted by barti-ddu, it is likely a bug

The one of workarounds is to disable kernel allocation randomization:

echo 0 > /proc/sys/kernel/randomize_va_space
share|improve this answer
i wish you accepted your answer so that it stays on top ;) Concerning va space randomization it is better (if possible) to upgrade the kernel, since disabling it is a security risk. Anyway, glad you've resolved the loader issue, good luck. – barti_ddu Aug 16 '12 at 21:32
"You can accept your own answer in 22 hours". You can re-post it as your answer, so I'll accept it. – Vi. Aug 16 '12 at 22:04

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.