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
620fc8b2
Commit
620fc8b2
authored
4 years ago
by
Basile Desloges
Browse files
Options
Downloads
Patches
Plain Diff
[eacsl:runtime] Add segment name in the message for failed validation
parent
1041de0a
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/share/e-acsl/observation_model/segment_model/e_acsl_segment_tracking.c
+12
-3
12 additions, 3 deletions
...observation_model/segment_model/e_acsl_segment_tracking.c
with
12 additions
and
3 deletions
src/plugins/e-acsl/share/e-acsl/observation_model/segment_model/e_acsl_segment_tracking.c
+
12
−
3
View file @
620fc8b2
...
@@ -172,19 +172,25 @@ void validate_shadow_layout() {
...
@@ -172,19 +172,25 @@ void validate_shadow_layout() {
#endif
#endif
int
num_segments
=
num_partitions
*
num_seg_in_part
;
int
num_segments
=
num_partitions
*
num_seg_in_part
;
uintptr_t
segments
[
num_segments
][
2
];
uintptr_t
segments
[
num_segments
][
2
];
const
char
*
segment_names
[
num_segments
];
size_t
i
;
size_t
i
;
for
(
i
=
0
;
i
<
num_partitions
;
i
++
)
{
for
(
i
=
0
;
i
<
num_partitions
;
i
++
)
{
memory_partition
*
p
=
mem_partitions
[
i
];
memory_partition
*
p
=
mem_partitions
[
i
];
segment_names
[
num_seg_in_part
*
i
]
=
p
->
application
.
name
;
segments
[
num_seg_in_part
*
i
][
0
]
=
p
->
application
.
start
;
segments
[
num_seg_in_part
*
i
][
0
]
=
p
->
application
.
start
;
segments
[
num_seg_in_part
*
i
][
1
]
=
p
->
application
.
end
;
segments
[
num_seg_in_part
*
i
][
1
]
=
p
->
application
.
end
;
segment_names
[
num_seg_in_part
*
i
+
1
]
=
p
->
primary
.
name
;
segments
[
num_seg_in_part
*
i
+
1
][
0
]
=
p
->
primary
.
start
;
segments
[
num_seg_in_part
*
i
+
1
][
0
]
=
p
->
primary
.
start
;
segments
[
num_seg_in_part
*
i
+
1
][
1
]
=
p
->
primary
.
end
;
segments
[
num_seg_in_part
*
i
+
1
][
1
]
=
p
->
primary
.
end
;
segment_names
[
num_seg_in_part
*
i
+
2
]
=
p
->
secondary
.
name
;
segments
[
num_seg_in_part
*
i
+
2
][
0
]
=
p
->
secondary
.
start
;
segments
[
num_seg_in_part
*
i
+
2
][
0
]
=
p
->
secondary
.
start
;
segments
[
num_seg_in_part
*
i
+
2
][
1
]
=
p
->
secondary
.
end
;
segments
[
num_seg_in_part
*
i
+
2
][
1
]
=
p
->
secondary
.
end
;
#ifdef E_ACSL_TEMPORAL
#ifdef E_ACSL_TEMPORAL
segment_names
[
num_seg_in_part
*
i
+
3
]
=
p
->
temporal_primary
.
name
;
segments
[
num_seg_in_part
*
i
+
3
][
0
]
=
p
->
temporal_primary
.
start
;
segments
[
num_seg_in_part
*
i
+
3
][
0
]
=
p
->
temporal_primary
.
start
;
segments
[
num_seg_in_part
*
i
+
3
][
1
]
=
p
->
temporal_primary
.
end
;
segments
[
num_seg_in_part
*
i
+
3
][
1
]
=
p
->
temporal_primary
.
end
;
segment_names
[
num_seg_in_part
*
i
+
4
]
=
p
->
temporal_secondary
.
name
;
segments
[
num_seg_in_part
*
i
+
4
][
0
]
=
p
->
temporal_secondary
.
start
;
segments
[
num_seg_in_part
*
i
+
4
][
0
]
=
p
->
temporal_secondary
.
start
;
segments
[
num_seg_in_part
*
i
+
4
][
1
]
=
p
->
temporal_secondary
.
end
;
segments
[
num_seg_in_part
*
i
+
4
][
1
]
=
p
->
temporal_secondary
.
end
;
#endif
#endif
...
@@ -194,14 +200,17 @@ void validate_shadow_layout() {
...
@@ -194,14 +200,17 @@ void validate_shadow_layout() {
size_t
j
;
size_t
j
;
for
(
int
i
=
0
;
i
<
num_segments
;
i
++
)
{
for
(
int
i
=
0
;
i
<
num_segments
;
i
++
)
{
uintptr_t
*
src
=
segments
[
i
];
uintptr_t
*
src
=
segments
[
i
];
const
char
*
src_name
=
segment_names
[
i
];
DVASSERT
(
src
[
0
]
<
src
[
1
],
DVASSERT
(
src
[
0
]
<
src
[
1
],
"Segment start is greater than segment end %lu < %lu
\n
"
,
src
[
0
],
src
[
1
]);
"Segment %s start is greater than segment end %lu < %lu
\n
"
,
src_name
,
src
[
0
],
src
[
1
]);
for
(
j
=
0
;
j
<
num_segments
;
j
++
)
{
for
(
j
=
0
;
j
<
num_segments
;
j
++
)
{
if
(
i
!=
j
)
{
if
(
i
!=
j
)
{
uintptr_t
*
dest
=
segments
[
j
];
uintptr_t
*
dest
=
segments
[
j
];
const
char
*
dest_name
=
segment_names
[
j
];
DVASSERT
(
src
[
1
]
<
dest
[
0
]
||
src
[
0
]
>
dest
[
1
],
DVASSERT
(
src
[
1
]
<
dest
[
0
]
||
src
[
0
]
>
dest
[
1
],
"Segment [%lu, %lu] overlaps with segment [%lu, %lu]"
,
"Segment
%s
[%lu, %lu] overlaps with segment
%s
[%lu, %lu]"
,
src
[
0
],
src
[
1
],
dest
[
0
],
dest
[
1
]);
src_name
,
src
[
0
],
src
[
1
],
dest_name
,
dest
[
0
],
dest
[
1
]);
}
}
}
}
}
}
...
...
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