Skip to content
Advertisement

Tag: nasm

Why data and stack segments are executable?

I have just noticed that my simple program has its data and stack segments executable. I saw it in /proc/[pid]/maps, and simple code confirmed it. For example: then causes prog to execute int3 instruction. Programs written in C and built with gcc have their data, stack and heap non-executable, so why those written in assembly behave in a different manner?

Advertisement