summaryrefslogtreecommitdiffstats
path: root/loc2c.c
diff options
context:
space:
mode:
authorRoland McGrath <roland@redhat.com>2009-11-24 13:22:27 -0800
committerRoland McGrath <roland@redhat.com>2009-11-24 13:22:27 -0800
commit8a77568afb95434e08637268084f4ee65cd6785c (patch)
treee4374a2350ffd787a39c4b63a022a4daee4b4465 /loc2c.c
parentb2f9c9051897d50ad59b06f9e305083eab84fd4b (diff)
downloadsystemtap-steved-8a77568afb95434e08637268084f4ee65cd6785c.tar.gz
systemtap-steved-8a77568afb95434e08637268084f4ee65cd6785c.tar.xz
systemtap-steved-8a77568afb95434e08637268084f4ee65cd6785c.zip
Fix uninitialized fields in loc2c.
* loc2c.c (alloc_location, location_from_address, c_translate_constant): Initialize ops and nops fields.
Diffstat (limited to 'loc2c.c')
-rw-r--r--loc2c.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/loc2c.c b/loc2c.c
index e995b999..008d5a42 100644
--- a/loc2c.c
+++ b/loc2c.c
@@ -85,6 +85,8 @@ alloc_location (struct obstack *pool, struct location *origin)
loc->emit_address = origin->emit_address;
loc->byte_size = 0;
loc->frame_base = NULL;
+ loc->ops = NULL;
+ loc->nops = 0;
return loc;
}
@@ -669,6 +671,8 @@ location_from_address (struct obstack *pool,
loc->emit_address = *input == NULL ? emit_address : (*input)->emit_address;
loc->byte_size = 0;
loc->frame_base = NULL;
+ loc->ops = NULL;
+ loc->nops = 0;
bool need_fb = false;
size_t loser;
@@ -1189,6 +1193,8 @@ c_translate_constant (struct obstack *pool,
loc->address.stack_depth = 0;
loc->address.declare = NULL;
loc->address.used_deref = false;
+ loc->ops = NULL;
+ loc->nops = 0;
switch (dwarf_whatform (attr))
{