aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Meissner <meissner@gcc.gnu.org>1992-10-22 18:57:59 +0000
committerMichael Meissner <meissner@gcc.gnu.org>1992-10-22 18:57:59 +0000
commitb865c41d292b2088fbb482c4b1001015c227feb0 (patch)
tree1b1b31e371410a8bb501732849f200cebff0a014
parent9a29212675a5de3f70670c35b319037ce4974233 (diff)
downloadgcc-b865c41d292b2088fbb482c4b1001015c227feb0.zip
gcc-b865c41d292b2088fbb482c4b1001015c227feb0.tar.gz
gcc-b865c41d292b2088fbb482c4b1001015c227feb0.tar.bz2
Allow a stab line number of 0, since G++ generates it; check for >= 2**20.
From-SVN: r2561
-rw-r--r--gcc/mips-tfile.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/gcc/mips-tfile.c b/gcc/mips-tfile.c
index 94ecc55..78f8236 100644
--- a/gcc/mips-tfile.c
+++ b/gcc/mips-tfile.c
@@ -3678,12 +3678,18 @@ parse_stabs_common (string_start, string_end, rest)
code = strtol (p+3, &p, 0);
ch = *++p;
- if (code <= 0 || p[-1] != ',' || isdigit (ch) || !IS_ASM_IDENT (ch))
+ if (p[-1] != ',' || isdigit (ch) || !IS_ASM_IDENT (ch))
{
error ("Illegal line number .stabs/.stabn directive");
return;
}
+ if (code < 0 || code >= 0x100000)
+ {
+ error ("Line number for .stabs/.stabn directive cannot fit in index field (20 bits)");
+ return;
+ }
+
shash_ptr = hash_string (p,
strlen (p) - 1,
&orig_str_hash[0],