Well this is embarrassing...
I never compiled it without -Og, it turns out
the program segfaults immediately without because
of an uninitialised variable.
---
 patch.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/patch.c b/patch.c
index 7017147..ee84a0f 100644
--- a/patch.c
+++ b/patch.c
@@ -1727,7 +1727,7 @@ main(int argc, char *argv[])
 {
        struct patchset patchset;
        struct file_data patchfile_data;
-       char *p, *Dflag;
+       char *p, *Dflag = 0;
 
        stdin_dash[0] = stdout_dash[0] = '-';
        stdin_dash[1] = stdout_dash[1] = '\0';
-- 
2.7.3


Reply via email to