liu.seSearch for publications in DiVA
CiteExportLink to record
Permanent link

Direct link
Cite
Citation style
  • apa
  • ieee
  • modern-language-association-8th-edition
  • vancouver
  • oxford
  • Other style
More styles
Language
  • de-DE
  • en-GB
  • en-US
  • fi-FI
  • nn-NO
  • nn-NB
  • sv-SE
  • Other locale
More languages
Output format
  • html
  • text
  • asciidoc
  • rtf
Programming Language Standards and their impact on Memory Safety: C++, Rust and Python: A comparative study
Linköping University, Department of Computer and Information Science.
2026 (English)Independent thesis Basic level (degree of Bachelor), 10,5 credits / 16 HE creditsStudent thesisAlternative title
Programmeringsspråksstandarders inverkan på minnessäkerhet: C++, Rust och Python : En komparativ studie (Swedish)
Abstract [en]

Memory safety vulnerabilities remain a prevalent security challenge, accounting for a significant majority of critical software defects. This paper investigates how programming language standards influence memory safety by analyzing three distinct approaches: the manual memory management of C++, the ownership-based compile-time model of Rust, and the automatic garbage collection of Python. These languages are evaluated by reproducing a suite of Common Weakness Enumeration (CWE) vulnerabilities, including buffer overflows, use-after-free, and null pointer dereference conditions to determine the stage at which faults are detected: compile-time, runtime, or silent execution.The study highlights the fundamental trade-offs in language design: Rust shifts detection to the compilation phase by imposing strict compile-time discipline on the developer. C++ prioritizes runtime performance and control, often relying on warnings rather than errors at the risk of silent failures, and Python ensures safety through significant runtime overhead. These findings quantify the cost of safety, offering a comparative view of the memory overhead and safety guarantees inherent to each language's design.

Abstract [sv]

Säkerhetsbrister i minneshanteringen är fortfarande ett utbrett säkerhetsproblem och står för en betydande majoritet av alla kritiska programvarufel. Denna artikel undersöker hur standarder för programmeringsspråk påverkar minnessäkerheten genom att analysera tre olika tillvägagångssätt: den manuella minneshanteringen i C++, den äganderättsbaserade kompileringstidsmodellen i Rust och den automatiska sopuppsamlingen i Python. Dessa språk utvärderas genom att reproducera en serie sårbarheter från Common Weakness Enumeration (CWE), inklusive buffertöverskridningar, use-after-free och null-pekaravrefereringar, för att fastställa i vilket skede fel upptäcks: kompileringstid, körtid eller tyst körning.Studien belyser de grundläggande avvägningarna i språkutformningen: Rust flyttar detekteringen till kompileringsfasen genom att ålägga utvecklaren strikt disciplin vid kompilering. C++ prioriterar prestanda och kontroll vid körning och förlitar sig ofta på varningar snarare än fel, med risk för tysta fel, och Python säkerställer säkerhet genom betydande overhead vid körning. Dessa resultat kvantifierar säkerhetskostnaden och ger en jämförande bild av minnesöverhead och säkerhetsgarantier som är inneboende i varje språks utformning

Place, publisher, year, edition, pages
2026. , p. 10
Keywords [en]
Rust, C++, Python, Memory Safety, Vulnerabilities, Programming Language Standards
National Category
Computer Engineering
Identifiers
URN: urn:nbn:se:liu:diva-226479ISRN: LIU-IDA/LITH-EX-G--26/057--SEOAI: oai:DiVA.org:liu-226479DiVA, id: diva2:2091281
Subject / course
Computer Engineering
Presentation
2026-08-12, P26, Hans Meijers väg 16, Linköping, 10:15 (Swedish)
Supervisors
Examiners
Available from: 2026-08-12 Created: 2026-08-11 Last updated: 2026-08-12Bibliographically approved

Open Access in DiVA

plsmemsafe(309 kB)17 downloads
File information
File name FULLTEXT01.pdfFile size 309 kBChecksum SHA-512
c062c435186ac73de906d545aed3ced9101e99b60b93eedb8b22e6a1d33e46a4a42d4e23b12abf313308765ce7289a0a5fa968422ca88695c09de096a6fcbb30
Type fulltextMimetype application/pdf

Search in DiVA

By author/editor
Andersson, Oliver
By organisation
Department of Computer and Information Science
Computer Engineering

Search outside of DiVA

GoogleGoogle Scholar
The number of downloads is the sum of all downloads of full texts. It may include eg previous versions that are now no longer available

urn-nbn

Altmetric score

urn-nbn
Total: 3448 hits
CiteExportLink to record
Permanent link

Direct link
Cite
Citation style
  • apa
  • ieee
  • modern-language-association-8th-edition
  • vancouver
  • oxford
  • Other style
More styles
Language
  • de-DE
  • en-GB
  • en-US
  • fi-FI
  • nn-NO
  • nn-NB
  • sv-SE
  • Other locale
More languages
Output format
  • html
  • text
  • asciidoc
  • rtf