Commit 744b4913 authored by Thanassis Tsiodras's avatar Thanassis Tsiodras
Browse files

Use the new version of the stack checker, that reports the full callchain path.

parent 8324217c
......@@ -20,9 +20,10 @@ def report_partition_@_LOWER:Name_@():
print("[x] Aborting...")
sys.exit(1)
for line in os.popen("checkStackUsageGCCBased.py " + elf_binary + " ../"):
data = line.strip().split(':')
data = line.strip().split()
try:
stack_usage[data[1].strip()] = int(data[0])
if len(data) == 3:
stack_usage[data[1].strip()] = int(data[0][:-1]), data[2]
except:
pass
pohic_stack_of = {
......@@ -42,12 +43,14 @@ def report_partition_@_LOWER:Name_@():
" is either recursive or missing in", elf_binary)
else:
reserved_stack = pohic_stack_of[task_name]
actual_stack = stack_usage[task_name_job] + shift_offset
actual_stack, path = stack_usage[task_name_job]
actual_stack += shift_offset
print("[-] Stack usage of %32s" % task_name, "is %7d /%7d" % (
actual_stack, reserved_stack))
if reserved_stack < actual_stack:
print("[x] ERROR: Stack usage of", task_name, "is", actual_stack,
"which is higher than", reserved_stack)
print("[x] ERROR: Call chain is: ", path)
sys.exit(1)
@@TABLE@@
check_task("@_LOWER:Thread_Names_@")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment