Disable the Linux memory address randomization mechanism and disable process address space randomization. you can fix the base address, stack, and vdso page addresses of the mmap process. you can set kernel. randomize_va_space kernel parameters are used to set memory address randomization. currently, three randomize_va_space values are available: [, 2] 0-indicating that the process address space is disabled for randomization. 1-randomizes the base address, stack, and vdso pages of mmap. 2-adds heap randomization based on 1. # Echo 0>/proc/sys/kernel/randomize_va_space by using the following program, you can check whether the modification is successful (x86_64): // gcc-g stack. c-o stack // unsigned long sp (void) {asm ("mov % rsp, % rax");} int main (int argc, char ** argv) {unsigned long esp = sp (); printf ("Stack pointer (ESP: 0x % lx) \ n", esp); return 0 ;} close the running result-bash-4.1 #. /stack Stack pointer (ESP: 0x7fff50162e50)-bash-4.1 #. /stack Stack pointer (ESP: 0x7fff5d023730)-bash-4.1 #. /stack Stack pointer (ESP: 0x7ffff9982180)-bash-4.1 #. /stack Stack pointer (ESP: 0x7fffb23612a0)-bash-4.1 #. /stack Stack pointer (ESP: 0x7ffffd5a4980)-bash-4.1 #. /stack Stack pointer (ESP: 0x7fffbac61bf0) is disabled and the running result is-bash-4.1 #. /stack Stack pointer (ESP: 0x7fffffffeaf0)-bash-4.1 #. /stack Stack pointer (ESP: 0x7fffffffeaf0)-bash-4.1 #. /stack Stack pointer (ESP: 0x7fffffffeaf0)-bash-4.1 #. /stack Stack pointer (ESP: 0x7fffffffeaf0)-bash-4.1 #. /stack Stack pointer (ESP: 0x7fffffffeaf0)-bash-4.1 #. /stack Stack pointer (ESP: 0x7fffffffeaf0) Reference: http://en.wikipedia.org/wiki/Address_space_layout_randomizationhttp://xorl.wordpress.com/2011/01/16/linux-kernel-aslr-implementation/