Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
SMPStaticAnalyzer
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
SMPStaticAnalyzer
Commits
8050511f
Commit
8050511f
authored
7 years ago
by
jdh8d
Browse files
Options
Downloads
Patches
Plain Diff
STARS interface scripts cleanup
Former-commit-id: 1c2bda4e87056640ba7db93cba0a3b1d98cf8ad0
parent
f02d9d4f
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
SMP-analyze.sh
+12
-54
12 additions, 54 deletions
SMP-analyze.sh
with
12 additions
and
54 deletions
SMP-analyze.sh
+
12
−
54
View file @
8050511f
...
...
@@ -77,74 +77,32 @@ rm -f ${IDALOG}
old_stty
=
`
stty
-g
`
||
true
if
[
-n
"
$SMPSA_PLUGIN
"
]
;
then
OVERRIDE_PLUGIN
=
$GRACE_HOME
/concolic/bin/liboverride_smpsa_plugin.so
fi
# we can always use idal64, as it analyzes 32-bit binaries just fine. May use a bit more space, but isn't typically a problem.
myidal
=
idal64
# if LANG is set, ida can core dump
unset
LANG
#
# if TVHEADLESS is set, call idal on the idapro server
#
echo
TVHEADLESS is
$TVHEADLESS
if
[
$TVHEADLESS
"X"
!=
"X"
]
;
then
case
"
$IDAROOT
"
in
*
idapro5
*
)
case
"
$IDAROOT
"
in
*
idapro5
*
)
echo
"IDAPro 5.* support depreciated"
exit
1
echo
attempting server IDA
if
[
!
-n
$STRATA
]
;
then
echo
Please
set
\$
STRATA
exit
-1
fi
echo
connecting...
$STRATA
/tools/idaprod/idaprod_client
$SMPSA_HOME
$IDAROOT
$PWD
$STARS_ROOT_FILENAME
`
ulimit
-t
`
echo
did server IDA
;;
*
idapro6
*
)
echo
"Trying TVHEADLESS IDA"
TVHEADLESS
=
1
yes
|
LD_PRELOAD
=
$OVERRIDE_PLUGIN
time
${
IDAROOT
}
/
$myidal
-A
-SSMP
.idc
-L
${
IDALOG
}
$STARS_OPTIONS
$STARS_ROOT_FILENAME
>
$STARS_ROOT_FILENAME
.idaoutput 2>&1
echo
"Finished TVHEADLESS IDA"
grep
"FATAL ERROR: Memory exhausted."
${
STARS_ROOT_FILENAME
}
.log
>
/dev/null 2>/dev/null
res
=
$?
if
[
$res
=
0
]
;
then
echo
"OOM Failure detected -- trying reduced mode."
rm
*
.id?
*
.i64
$STARS_ROOT_FILENAME
.log
TVHEADLESS
=
1
yes
|
LD_PRELOAD
=
$OVERRIDE_PLUGIN
time
${
IDAROOT
}
/
$myidal
-A
-SSMP
.idc
-L
${
IDALOG
}
$STARS_OPTIONS
-OSMPStaticAnalyzer
:Reduced
$STARS_ROOT_FILENAME
>
$STARS_ROOT_FILENAME
.idaoutput 2>&1
fi
;;
*
idapro7
*
|
*
idaproCur
*
)
;;
*
idapro6
*
)
echo
"Trying TVHEADLESS IDA6"
myidal
=
idal64
;;
*
idapro7
*
|
*
idaproCur
*
)
echo
"Trying TVHEADLESS IDA7"
myidal
=
idat64
echo
"Trying TVHEADLESS IDA"
TVHEADLESS
=
1
LD_PRELOAD
=
$OVERRIDE_PLUGIN
time
${
IDAROOT
}
/
$myidal
-A
-SSMP
.idc
-L
${
IDALOG
}
$STARS_OPTIONS
-OSMPStaticAnalyzer
:Reduced
$STARS_ROOT_FILENAME
>
$STARS_ROOT_FILENAME
.idaoutput 2>&1
;;
;;
*
)
echo
Cannot determine idapro version:
$IDAROOT
exit
1
;;
esac
else
LD_PRELOAD
=
$OVERRIDE_PLUGIN
/usr/bin/time
${
IDAROOT
}
/
$myidal
-A
-SSMP
.idc
$STARS_OPTIONS
$STARS_ROOT_FILENAME
grep
"FATAL ERROR: Memory exhausted."
${
STARS_ROOT_FILENAME
}
.log
>
/dev/null 2>/dev/null
res
=
$?
if
[
$res
=
0
]
;
then
echo
"OOM Failure detected -- trying reduced mode."
rm
*
.id?
*
.i64
${
STARS_ROOT_FILENAME
}
.log
LD_PRELOAD
=
$OVERRIDE_PLUGIN
/usr/bin/time
${
IDAROOT
}
/
$myidal
-A
-SSMP
.idc
$STARS_OPTIONS
-OSMPStaticAnalyzer
:Reduced
$STARS_ROOT_FILENAME
fi
esac
# SMP seems to mess up the terminal, using this to fix it.
/usr/bin/reset
||
true
stty
$old_stty
||
true
fi
TVHEADLESS
=
1
time
${
IDAROOT
}
/
$myidal
-A
-SSMP
.idc
-L
${
IDALOG
}
$STARS_OPTIONS
-OSMPStaticAnalyzer
:Reduced
$STARS_ROOT_FILENAME
>
$STARS_ROOT_FILENAME
.idaoutput 2>&1
if
[
-f
$PEASOUP_HOME
/tools/add_ifunc_attr.sh
]
;
then
$PEASOUP_HOME
/tools/add_ifunc_attr.sh
${
STARS_ROOT_FILENAME
}
${
STARS_ROOT_FILENAME
}
.annot
...
...
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