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
2e2407c1
Commit
2e2407c1
authored
7 years ago
by
an7s
Browse files
Options
Downloads
Patches
Plain Diff
Test that p1 canary detection comes before gcc
Former-commit-id: 0057b2046e99517c0abd2199c2a9fe168835de02
parent
38d4ba68
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tools/transforms/tests/test_buffer_overflow.sh
+11
-0
11 additions, 0 deletions
tools/transforms/tests/test_buffer_overflow.sh
with
11 additions
and
0 deletions
tools/transforms/tests/test_buffer_overflow.sh
+
11
−
0
View file @
2e2407c1
...
...
@@ -55,10 +55,16 @@ build()
gcc
-o
test_buffer_overflow.exe test_buffer_overflow.c
-fno-stack-protector
}
build_with_stack_protector
()
{
gcc
-o
test_buffer_overflow.exe.sp test_buffer_overflow.c
}
protect
()
{
do_p1 ./test_buffer_overflow.exe test_buffer_overflow.exe.p1.189
do_p1 ./test_buffer_overflow.exe.sp test_buffer_overflow.exe.sp.p1.189
do_p1 ./test_buffer_overflow.exe test_buffer_overflow.exe.p1.188
"--detection_policy exit --detection_exit_code 188"
do_p1 ./test_buffer_overflow.exe test_buffer_overflow.exe.p1.hlt
"--detection_policy halt"
}
...
...
@@ -81,6 +87,7 @@ main()
{
clean
build
build_with_stack_protector
protect
get_correct
...
...
@@ -89,6 +96,7 @@ main()
test_functional test_buffer_overflow.exe.p1.189
test_functional test_buffer_overflow.exe.p1.188
test_functional test_buffer_overflow.exe.p1.hlt
test_functional test_buffer_overflow.exe.sp.p1.189
report
...
...
@@ -99,6 +107,9 @@ main()
test_detection test_buffer_overflow.exe.p1.188 188
test_detection test_buffer_overflow.exe.p1.hlt 139
# verify P1 detection comes before gcc stack smashing protection
test_detection test_buffer_overflow.exe.sp.p1.189 189
report
if
[[
$1
==
"-k"
]]
;
then
...
...
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