Date of Completion
Spring 5-10-2024
Thesis Advisor(s)
Seyedhamed Ghavamnia
Honors Major
Computer Science
Disciplines
Programming Languages and Compilers | Software Engineering
Abstract
C is a memory-unsafe language, which can cause software security issues. Rust is a more recent high-performance language that has memory-safe features, which motivates developers to move software to Rust. However, given the large existing C codebase, this is a tedious task, and current approaches result in memory-unsafe blocks of code remaining unsafe after conversion. We seek to use program analysis techniques to create software that identifies blocks of C code that could be safely converted to memory-safe Rust, despite using seemingly memory- unsafe access patterns. We performed manual translation of functions within the libGeoIP C library to Rust, ensuring functionality when calling Rust code within the C library. As a result of our work, we identified several patterns that is present in code that is simple to translate, which can be easily identified using static analysis. We then implemented an LLVM pass to identify these patterns, and ran it on libGeoIP to evaluate its robustness.
Recommended Citation
Cassidy, Dylan, "Program Analysis of C for Conversion to Memory-Safe Rust" (2024). Honors Scholar Theses. 994.
https://digitalcommons.lib.uconn.edu/srhonors_theses/994