Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Z
Zipr Toolchain
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD 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
Open Source Software
Zipr Toolchain
Commits
4fba5c9d
Commit
4fba5c9d
authored
13 years ago
by
an7s
Browse files
Options
Downloads
Patches
Plain Diff
...
Former-commit-id: afc11007535f9bc949866ecd337ae0bf608b55af
parent
afa091db
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
libtransform/tests/mitre/TC_C_191_v304/src/Makefile
+1
-1
1 addition, 1 deletion
libtransform/tests/mitre/TC_C_191_v304/src/Makefile
libtransform/tests/mitre/TC_C_191_v304/src/recaman.c
+9
-1
9 additions, 1 deletion
libtransform/tests/mitre/TC_C_191_v304/src/recaman.c
with
10 additions
and
2 deletions
libtransform/tests/mitre/TC_C_191_v304/src/Makefile
+
1
−
1
View file @
4fba5c9d
...
...
@@ -22,7 +22,7 @@ recaman_release: recaman_release.o
$(
SS_CC
)
$(
COMMON_FLAGS
)
$(
SS_CFLAGs
)
-std
=
c99
$<
-o
$@
recaman.peasoup
:
recaman_debug
$(
PEASOUP_HOME
)
/tools/ps_analyze.sh recaman_debug recaman.peasoup
--step
ilr
=
off
--step
p1transform
=
o
n
--step
concolic
=
o
n
$(
PEASOUP_HOME
)
/tools/ps_analyze.sh recaman_debug recaman.peasoup
--step
ilr
=
off
--step
p1transform
=
o
ff
--step
concolic
=
o
ff
--step
signconv_func_monitor
=
on
--step
integertransform
=
off
clean
:
rm
-f
*
.o recaman_debug recaman_release
...
...
This diff is collapsed.
Click to expand it.
libtransform/tests/mitre/TC_C_191_v304/src/recaman.c
+
9
−
1
View file @
4fba5c9d
...
...
@@ -73,6 +73,8 @@ int main(void)
fputs
(
"Enter a sequence number [ >= 0 ]: "
,
stdout
);
fflush
(
stdout
);
fputs
(
"A0"
,
stdout
);
fflush
(
stdout
);
char
*
end
,
buff
[
7
];
char
*
rBuff
=
fgets
(
buff
,
sizeof
buff
,
stdin
);
//STONESOUP:INTERACTION_POINT //STONESOUP:feature-PIPE
...
...
@@ -80,11 +82,15 @@ int main(void)
value
=
-
1
;
return
1
;
}
fputs
(
"A"
,
stdout
);
fflush
(
stdout
);
value
=
(
short
)
strtol
(
buff
,
&
end
,
10
);
fflush
(
stdin
);
if
(
!
(
!
isspace
(
*
buff
)
&&
end
!=
buff
&&
(
*
end
==
'\n'
||
*
end
==
'\0'
)))
return
1
;
fputs
(
"B"
,
stdout
);
fflush
(
stdout
);
//-1 is the "magic" value that will quit out of the while loop
if
(
value
==
-
1
)
{
...
...
@@ -92,6 +98,8 @@ int main(void)
}
//Otherwise, send the value to the recaman function if its greater than zero
else
if
(
value
>=
0
)
{
fputs
(
"C"
,
stdout
);
fflush
(
stdout
);
signed
short
stuff
[
100
];
//STONESOUP:feature-SIGNED_SHORT
short
y
=
(
short
)(
-
(
-
32700
-
value
))
/
(
short
)
350
;
//STONESOUP:CROSSOVER_POINT
...
...
@@ -100,7 +108,7 @@ int main(void)
*
(
stuff
+
x
[
1
])
=
value
;
//STONESOUP:TRIGGER_POINT //STONESOUP:feature-BUFFER_ADDRESS_ARRAY_INDEX
// CLARK: if you uncomment the printf below, we will get a successful detection
//
printf("debug: value: %d %d\n", value, *(stuff+x[1])); // this causes the detection
printf
(
"debug: value: %d %d
\n
"
,
value
,
*
(
stuff
+
x
[
1
]));
// this causes the detection
printf
(
"%d
\n\n
"
,
recaman
(
*
(
stuff
+
x
[
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