[root@fruid-dev ~]# vi main.c [root@fruid-dev ~]# gcc main.c [root@fruid-dev ~]# ./a.out Segmentation fault (core dumped) [root@fruid-dev ~]# cat main.c int main(){ char *p="ABCD"; *p='J'; } [root@fruid-dev ~]# valgrind ./a.out ==7844== Memcheck, a memory error detector ==7844== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al. ==7844== Using Valgrind-3.13.0 and LibVEX; rerun with -h for copyright info ==7844== Command: ./a.out ==7844== ==7844== ==7844== Process terminating with default action of signal 11 (SIGSEGV): dumping core ==7844== Bad permissions for mapped region at address 0x4005A0 ==7844== at 0x4004FD: main (in /root/a.out) ==7844== ==7844== HEAP SUMMARY: ==7844== in use at exit: 0 bytes in 0 blocks ==7844== total heap usage: 0 allocs, 0 frees, 0 bytes allocated ==7844== ==7844== All heap blocks were freed -- no leaks are possible ==7844== ==7844== For counts of detected and suppressed errors, rerun with: -v ==7844== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0) Segmentation fault (core dumped) [root@fruid-dev ~]#