trailofbits / polytracker

An LLVM-based instrumentation tool for universal taint tracking, dataflow analysis, and tracing.
Apache License 2.0
516 stars 47 forks source link

Applications that exit with `assert` kills the `polytracker info` command #6528

Open hbrodin opened 1 year ago

hbrodin commented 1 year ago

If an application exits due to an assert (or otherwise unexpected exit). The size fields for each section remains at it's allocated size. Under normal circumstances, that size is updated when the application exits.

A first mitigation to prevent crash and just return an empty output file could be to initialize each section size to zero. Other options to explore is to have each section update the size as soon as anything is written (requiring an additional write for each write to a section).