Skip to content

Instantly share code, notes, and snippets.

@boramalper
Last active August 29, 2015 14:13
Show Gist options
  • Save boramalper/b0c6116ada4dd8f7e80a to your computer and use it in GitHub Desktop.
Save boramalper/b0c6116ada4dd8f7e80a to your computer and use it in GitHub Desktop.

Revisions

  1. boramalper revised this gist Jan 21, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion test.py
    Original file line number Diff line number Diff line change
    @@ -2,4 +2,4 @@

    import subprocess

    subprocess.call(["main"].extend(["f"]*(2**32)))
    subprocess.call(["./main"] + ["f"]*(2**32))
  2. boramalper revised this gist Jan 21, 2015. 2 changed files with 2 additions and 1 deletion.
    1 change: 1 addition & 0 deletions main.c
    Original file line number Diff line number Diff line change
    @@ -3,6 +3,7 @@
    int main(int argc, char **argv)
    {
    printf("argc : %d\n", argc);
    printf("sizeof(argc) : %zu\n", sizeof(argc));
    printf("argv[argc] == NULL: %s\n", argv[argc] == NULL ? "True" : "False");

    return 0;
    2 changes: 1 addition & 1 deletion makefile
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,5 @@
    CC=gcc
    CFLAGS=-Wall -Werror -pedantic
    CFLAGS=-Wall -Werror -pedantic -std=c99

    all:
    $(CC) $(CFLAGS) main.c -o main
  3. boramalper created this gist Jan 21, 2015.
    9 changes: 9 additions & 0 deletions main.c
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,9 @@
    #include <stdio.h>

    int main(int argc, char **argv)
    {
    printf("argc : %d\n", argc);
    printf("argv[argc] == NULL: %s\n", argv[argc] == NULL ? "True" : "False");

    return 0;
    }
    5 changes: 5 additions & 0 deletions makefile
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,5 @@
    CC=gcc
    CFLAGS=-Wall -Werror -pedantic

    all:
    $(CC) $(CFLAGS) main.c -o main
    5 changes: 5 additions & 0 deletions test.py
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,5 @@
    #!/usr/bin/env python

    import subprocess

    subprocess.call(["main"].extend(["f"]*(2**32)))