]> git.pld-linux.org Git - packages/bison.git/commitdiff
- (from 1.875c devel version) always initialize code_start to avoid possible SEGV...
authorJakub Bogusz <qboosh@pld-linux.org>
Wed, 14 Jan 2004 21:12:11 +0000 (21:12 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
- patch .c too, to avoid loop with BR: flex

Changed files:
    bison-code_start-segv.patch -> 1.1

bison-code_start-segv.patch [new file with mode: 0644]

diff --git a/bison-code_start-segv.patch b/bison-code_start-segv.patch
new file mode 100644 (file)
index 0000000..a5b70af
--- /dev/null
@@ -0,0 +1,46 @@
+--- bison-1.875/src/scan-gram.l.orig   2002-12-31 03:26:51.000000000 +0100
++++ bison-1.875/src/scan-gram.l        2004-01-14 22:04:21.275226859 +0100
+@@ -43,6 +43,7 @@
+       scanner_cursor.file = current_file;             \
+       scanner_cursor.line = 1;                                \
+       scanner_cursor.column = 1;                      \
++      code_start = scanner_cursor;                    \
+     }                                                 \
+   while (0)
+@@ -138,8 +139,10 @@
+   /* Location of most recent identifier, when applicable.  */
+   location id_loc IF_LINT (= *loc);
+-  /* Where containing code started, when applicable.  */
+-  boundary code_start IF_LINT (= loc->start);
++  /* Where containing code started, when applicable.  Its initial
++     value is relevant only when yylex is invoked in the SC_EPILOGUE
++     start condition.  */
++  boundary code_start = scanner_cursor;
+   /* Where containing comment or string or character literal started,
+      when applicable.  */
+--- bison-1.875/src/scan-gram.c.orig   2003-01-01 10:15:09.000000000 +0100
++++ bison-1.875/src/scan-gram.c        2004-01-14 22:05:08.186798095 +0100
+@@ -738,6 +738,7 @@
+       scanner_cursor.file = current_file;             \
+       scanner_cursor.line = 1;                                \
+       scanner_cursor.column = 1;                      \
++      code_start = scanner_cursor;                    \
+     }                                                 \
+   while (0)
+@@ -989,8 +990,10 @@
+   /* Location of most recent identifier, when applicable.  */
+   location id_loc IF_LINT (= *loc);
+-  /* Where containing code started, when applicable.  */
+-  boundary code_start IF_LINT (= loc->start);
++  /* Where containing code started, when applicable.  Its initial
++     value is relevant only when yylex is invoked in the SC_EPILOGUE
++     start condition.  */
++  boundary code_start = scanner_cursor;
+   /* Where containing comment or string or character literal started,
+      when applicable.  */
This page took 0.057498 seconds and 4 git commands to generate.