Advertisement
d1cor

segfault.c

May 4th, 2018
235
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.27 KB | None | 0 0
  1. /* Este codigo seguramente produzca un segmentation fault :) */
  2. /* Compilar en línea de comandos con:
  3.  * gcc segfault.c -o segfault
  4.  *
  5.  * Ejecutar con:
  6.  * ./segfault
  7.  */
  8.  
  9. int main(int argc, const char *argv[]){
  10.    
  11.     int *ptr;
  12.     *(ptr + 1000000) = 10;
  13.  
  14.     return 0;
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement