[erlang-bugs] Executable stack in beam.smp and beam

Mikael Pettersson mikpe@REDACTED
Tue Dec 9 09:25:05 CET 2008


Lars Strojny writes:
>the package management system of the Linux distribution Gentoo - Portage
>- has some QA mechanisms in place to verify a freshly compiled package
>"behaves well". On of these mechanisms is the check for executable stack
>with scanelf. While installing R12B I've stumbled upon executable stack
>in the executables beamp.smp and beam. The scanelf log is attached, the
>relevant Gentoo bug can be found at
>https://bugs.gentoo.org/show_bug.cgi?id=3D249328
>
>Thanks in advance,
>Lars
>
>RWX --- --- work/otp_src_R12B-5/bin/x86_64-pc-linux-gnu/beam
>RWX --- --- work/otp_src_R12B-5/bin/x86_64-pc-linux-gnu/beam.smp
>!WX --- --- work/otp_src_R12B-5/erts/emulator/obj/x86_64-pc-linux-gnu/opt/smp/hipe_amd64_bifs.o
>!WX --- --- work/otp_src_R12B-5/erts/emulator/obj/x86_64-pc-linux-gnu/opt/smp/hipe_amd64_glue.o
>!WX --- --- work/otp_src_R12B-5/erts/emulator/obj/x86_64-pc-linux-gnu/opt/plain/hipe_amd64_bifs.o
>!WX --- --- work/otp_src_R12B-5/erts/emulator/obj/x86_64-pc-linux-gnu/opt/plain/hipe_amd64_glue.o
>RWX --- --- image/usr/lib64/erlang/erts-5.6.5/bin/beam
>RWX --- --- image/usr/lib64/erlang/erts-5.6.5/bin/beam.smp
>RWX --- --- image/usr/lib/debug/usr/lib64/erlang/erts-5.6.5/bin/beam.smp.debug
>RWX --- --- image/usr/lib/debug/usr/lib64/erlang/erts-5.6.5/bin/beam.debug

I see no actual install failure in either the above message or the gentoo
bug report linked to above. And the scanelf log tells me nothing useful.

Anyway I strongly suspect this is a false positive. AFAIK the Erlang/OTP
runtime system uses no nested C functions or anything else that would
generate code on the stack. It does however contain hand-written assembly
file modules, which do not have those magic .GNU.stack (sp?) annotations.

Please show us exactly where the executable stack occurs.



More information about the erlang-bugs mailing list