Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
frama-c
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
pub
frama-c
Commits
b36a6244
Commit
b36a6244
authored
9 years ago
by
Kostyantyn Vorobyov
Browse files
Options
Downloads
Patches
Plain Diff
[tests] Fixed a few typos in the initialized test case
parent
74ca2189
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/plugins/e-acsl/tests/e-acsl-runtime/initialized.c
+7
-7
7 additions, 7 deletions
src/plugins/e-acsl/tests/e-acsl-runtime/initialized.c
with
7 additions
and
7 deletions
src/plugins/e-acsl/tests/e-acsl-runtime/initialized.c
+
7
−
7
View file @
b36a6244
...
@@ -33,7 +33,7 @@ int main(void) {
...
@@ -33,7 +33,7 @@ int main(void) {
/*@assert \initialized(&c) ; */
/*@assert \initialized(&c) ; */
/*@assert ! \initialized(&d) ; */
/*@assert ! \initialized(&d) ; */
/* Local variables also initialized by assignments */
/* Local variables
can
also
be
initialized by assignments */
b
=
0
;
b
=
0
;
d
[
0
]
=
1
;
d
[
0
]
=
1
;
/*@assert \initialized(&b); */
/*@assert \initialized(&b); */
...
@@ -50,7 +50,7 @@ int main(void) {
...
@@ -50,7 +50,7 @@ int main(void) {
q
=
(
int
*
)
calloc
(
1
,
sizeof
(
int
));
q
=
(
int
*
)
calloc
(
1
,
sizeof
(
int
));
/*@ assert \initialized(q); */
/*@ assert \initialized(q); */
/* Block reallocared using `realloc' carries initialization of the
of the
/* Block reallocared using `realloc' carries initialization of the
* existing fragment but does not initialize the newly allocated one */
* existing fragment but does not initialize the newly allocated one */
q
=
(
int
*
)
realloc
(
q
,
2
*
sizeof
(
int
));
q
=
(
int
*
)
realloc
(
q
,
2
*
sizeof
(
int
));
/*@assert \initialized(q); */
/*@assert \initialized(q); */
...
@@ -58,19 +58,19 @@ int main(void) {
...
@@ -58,19 +58,19 @@ int main(void) {
/*@assert ! \initialized(q); */
/*@assert ! \initialized(q); */
q
--
;
q
--
;
/*
I
nitialized on un-allocated region
s
is always false. This does not
lead
/*
An i
nitialized on
an
un-allocated region is always false. This does not
* to undefined bevaviours in production mode or assertion failures in
debug
*
lead
to undefined bevaviours in production mode or assertion failures in
* mode. */
*
debug
mode. */
free
(
p
);
free
(
p
);
free
(
q
);
free
(
q
);
/*@assert ! \initialized(p); */
/*@assert ! \initialized(p); */
/*@assert ! \initialized(q); */
/*@assert ! \initialized(q); */
/* Spoofing access to non-existing stack address */
/* Spoofing access to
a
non-existing stack address */
q
=
(
int
*
)(
&
q
-
1024
*
5
);
q
=
(
int
*
)(
&
q
-
1024
*
5
);
/*assert ! \initialized(q); */
/*assert ! \initialized(q); */
/* Spoofing access to non-existing global address */
/* Spoofing access to
a
non-existing global address */
q
=
(
int
*
)
128
;
q
=
(
int
*
)
128
;
/*@assert ! \initialized(q); */
/*@assert ! \initialized(q); */
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment