summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfche <fche>2005-07-11 19:58:00 +0000
committerfche <fche>2005-07-11 19:58:00 +0000
commit3f43362a3e5b1e800819d13e3068328e24589495 (patch)
tree9ca909a6e034ee0ac748c558ef68e584d382ba6f
parent24a0bfe975384f1b43ecd64fa86f292db0263b31 (diff)
downloadsystemtap-steved-3f43362a3e5b1e800819d13e3068328e24589495.tar.gz
systemtap-steved-3f43362a3e5b1e800819d13e3068328e24589495.tar.xz
systemtap-steved-3f43362a3e5b1e800819d13e3068328e24589495.zip
2005-07-11 Frank Ch. Eigler <fche@redhat.com>
* parse.cxx (parse_literal): Compile cleanly on 64-bit host. * staptree.cxx (deep_copy_visitor::visit_if_statement): Don't freak on a null if_statement.elseblock.
-rw-r--r--ChangeLog6
-rw-r--r--parse.cxx2
-rw-r--r--staptree.cxx5
3 files changed, 11 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 1d3002a8..48523355 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2005-07-11 Frank Ch. Eigler <fche@redhat.com>
+
+ * parse.cxx (parse_literal): Compile cleanly on 64-bit host.
+ * staptree.cxx (deep_copy_visitor::visit_if_statement): Don't
+ freak on a null if_statement.elseblock.
+
2005-07-07 Graydon Hoare <graydon@redhat.com>
* staptree.{h,cxx} (deep_copy_visitor): New visitor.
diff --git a/parse.cxx b/parse.cxx
index bcf634e6..5d09a657 100644
--- a/parse.cxx
+++ b/parse.cxx
@@ -732,7 +732,7 @@ parser::parse_literal ()
errno = 0;
long long value = strtoll (startp, & endp, 0);
if (errno == ERANGE || errno == EINVAL || *endp != '\0'
- || value > ULONG_MAX || value < LONG_MIN)
+ || value > 4294967295LL || value < (-2147483647LL-1))
throw parse_error ("number invalid or out of range");
long value2 = (long) value;
diff --git a/staptree.cxx b/staptree.cxx
index 94c04894..7192c4b8 100644
--- a/staptree.cxx
+++ b/staptree.cxx
@@ -1033,7 +1033,10 @@ deep_copy_visitor::visit_if_statement (if_statement* s)
if_statement *n = new if_statement;
require <expression*> (this, &(n->condition), s->condition);
require <statement*> (this, &(n->thenblock), s->thenblock);
- require <statement*> (this, &(n->elseblock), s->elseblock);
+ if (s->elseblock)
+ require <statement*> (this, &(n->elseblock), s->elseblock);
+ else
+ n->elseblock = 0;
provide <if_statement*> (this, n);
}