Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Zwinkau
libfirm
Commits
79a69c11
Commit
79a69c11
authored
Oct 24, 2014
by
yb9976
Browse files
Avoid invalid memcpy calls.
parent
a2394177
Changes
1
Hide whitespace changes
Inline
Side-by-side
ir/ir/irnode.c
View file @
79a69c11
...
@@ -178,7 +178,10 @@ void set_irn_in(ir_node *const node, int const arity, ir_node *const *const in)
...
@@ -178,7 +178,10 @@ void set_irn_in(ir_node *const node, int const arity, ir_node *const *const in)
}
}
fix_backedges
(
get_irg_obstack
(
irg
),
node
);
fix_backedges
(
get_irg_obstack
(
irg
),
node
);
memcpy
((
*
pOld_in
)
+
1
,
in
,
sizeof
(
ir_node
*
)
*
arity
);
/* Calling memcpy with a null pointer leads to undefined behavior,
* even if we copy zero bytes (C99 7.21.1.p2). */
if
(
arity
>
0
)
memcpy
((
*
pOld_in
)
+
1
,
in
,
sizeof
(
ir_node
*
)
*
arity
);
/* update irg flags */
/* update irg flags */
clear_irg_properties
(
irg
,
IR_GRAPH_PROPERTY_CONSISTENT_OUTS
|
IR_GRAPH_PROPERTY_CONSISTENT_LOOPINFO
);
clear_irg_properties
(
irg
,
IR_GRAPH_PROPERTY_CONSISTENT_OUTS
|
IR_GRAPH_PROPERTY_CONSISTENT_LOOPINFO
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment