Re: [dev] What is bad with Python

From: FRIGN <dev_AT_frign.de>
Date: Wed, 12 Mar 2014 20:04:56 +0100

On Wed, 12 Mar 2014 21:49:54 +0100
q_AT_c9x.me wrote:

> Maybe surprisingly, then:
>
> ~% cat > t.ml
> let () = print_string "hello world\n"
> ~% ocamlopt -o t t.ml
> ~% strip t
> ~% ls -lh t
> -rwxr-xr-x 1 xxxx users 124K Mar 12 16:48 t
> ~% ldd t
> linux-vdso.so.1 (0x00007fffbed70000)
> libm.so.6 => /usr/lib/libm.so.6 (0x00007fae08f33000)
> libdl.so.2 => /usr/lib/libdl.so.2 (0x00007fae08d2f000)
> libc.so.6 => /usr/lib/libc.so.6 (0x00007fae08987000)
> /lib64/ld-linux-x86-64.so.2 (0x00007fae09234000)
> ~% ./t
> hello world
> ~%

Impressive, but better use
 $ LD_TRACE_LOADED_OBJECTS=1 t
instead of
 $ ldd t
next time to prevent arbitrary code-execution[1] in case you're dealing
with unknown binaries.

Cheers

FRIGN


[1]: http://www.catonmat.net/blog/ldd-arbitrary-code-execution/
-- 
FRIGN <dev_AT_frign.de>
Received on Wed Mar 12 2014 - 20:04:56 CET

This archive was generated by hypermail 2.3.0 : Wed Mar 12 2014 - 22:12:06 CET