{"id":1236285,"date":"2025-03-03T03:34:00","date_gmt":"2025-03-03T08:34:00","guid":{"rendered":"https:\/\/www.prime-wow.com\/?p=1236285"},"modified":"2025-03-03T03:34:00","modified_gmt":"2025-03-03T08:34:00","slug":"can-trapc-fix-c-and-c-memory-safety-issues","status":"publish","type":"post","link":"https:\/\/www.prime-wow.com\/?p=1236285","title":{"rendered":"Can TrapC Fix C and C++ Memory Safety Issues?"},"content":{"rendered":"<div>&#8220;TrapC, a fork of the C language, is being developed as a potential solution for memory safety issues that have hindered the C and C++ languages,&#8221; reports InfoWorld.<br \/>\nBut also being developed is a compiler named trapc &#8220;intended to be implemented as a cybersecurity compiler for C and C++ code, said developer Robin Rowe&#8230;&#8221;<\/p>\n<p> Due by the end of this year, trapc will be a free, open source compiler similar to Clang&#8230; Rowe said. TrapC has pointers that are memory-safe, addressing the memory safety issue with the two languages. With TrapC, developers write in C or C++ and compile in TrapC, for memory safety&#8230;<br \/>\nRowe presented TrapC at an ISO C meeting this week. Developers can download a TrapC whitepaper and offer Rowe feedback. According to the whitepaper, TrapC&#8217;s memory management is automatic and cannot leak memory. Pointers are lifetime-managed, not garbage-collected. Also, TrapC reuses a few code safety features from C++, notably member functions, constructors, destructors, and the new keyword. <\/p>\n<p>&#8220;TrapC Memory Safe Pointers will not buffer overrun and will not segfault,&#8221; Rowe told the ISO C Committee standards body meeting, according to the Register. &#8220;When C code is compiled using a TrapC compiler, all pointers become Memory Safe Pointers and are checked.&#8221;<\/p>\n<p>In short, TrapC &#8220;is a programming language forked from C, with changes to make it LangSec and Memory Safe,&#8221; according to that white paper. &#8220;To accomplish that, TrapC seeks to eliminate all Undefined Behavior in the C programming language&#8230;&#8221; <\/p>\n<p>&#8220;The startup TRASEC and the non-profit Fountain Abode have a TrapC compiler in development, called trapc,&#8221; the whitepaper adds, and their mission is &#8220;to enable recompiling legacy C code into executables that are safe by design and secure by default, without needing much code refactoring&#8230; The TRASEC trapc cybersecurity compiler with AI code reasoning is expected to release as free open source software sometime in 2025.&#8221; <\/p>\n<p>In November the Register offered some background on the origins of TrapC&#8230;<\/p>\n<div class=\"share_submission\" style=\"position:relative;\">\n<a class=\"slashpop\" href=\"http:\/\/twitter.com\/home?status=Can+TrapC+Fix+C+and+C%2B%2B+Memory+Safety+Issues%3F%3A+https%3A%2F%2Fdevelopers.slashdot.org%2Fstory%2F25%2F03%2F03%2F0654205%2F%3Futm_source%3Dtwitter%26utm_medium%3Dtwitter\"><img decoding=\"async\" src=\"https:\/\/www.prime-wow.com\/wp-content\/uploads\/2025\/03\/twitter_icon_large-25.png\"><\/a><br \/>\n<a class=\"slashpop\" href=\"http:\/\/www.facebook.com\/sharer.php?u=https%3A%2F%2Fdevelopers.slashdot.org%2Fstory%2F25%2F03%2F03%2F0654205%2Fcan-trapc-fix-c-and-c-memory-safety-issues%3Futm_source%3Dslashdot%26utm_medium%3Dfacebook\"><img decoding=\"async\" src=\"https:\/\/www.prime-wow.com\/wp-content\/uploads\/2025\/03\/facebook_icon_large-25.png\"><\/a><\/p>\n<\/div>\n<p><a href=\"https:\/\/developers.slashdot.org\/story\/25\/03\/03\/0654205\/can-trapc-fix-c-and-c-memory-safety-issues?utm_source=rss1.0moreanon&amp;utm_medium=feed\">Read more of this story<\/a> at Slashdot.<\/p>\n<p><iframe src=\"https:\/\/slashdot.org\/slashdot-it.pl?op=discuss&amp;id=23625509&amp;smallembed=1\" style=\"height: 300px; width: 100%; border: none;\"><\/iframe><\/div>\n","protected":false},"excerpt":{"rendered":"<p>&#8220;TrapC, a fork of the C language, is being developed as a potential solution for memory safety issues that have hindered the C and C++ languages,&#8221; reports InfoWorld. But also being developed is a compiler named trapc &#8220;intended to be &hellip; <a href=\"https:\/\/www.prime-wow.com\/?p=1236285\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"ngg_post_thumbnail":0,"footnotes":""},"categories":[101,44,110],"tags":[],"class_list":["post-1236285","post","type-post","status-publish","format-standard","hentry","category-slashdot","category-technology","category-unfiltered-rss"],"_links":{"self":[{"href":"https:\/\/www.prime-wow.com\/index.php?rest_route=\/wp\/v2\/posts\/1236285","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.prime-wow.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.prime-wow.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.prime-wow.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.prime-wow.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1236285"}],"version-history":[{"count":0,"href":"https:\/\/www.prime-wow.com\/index.php?rest_route=\/wp\/v2\/posts\/1236285\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.prime-wow.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1236285"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.prime-wow.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1236285"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.prime-wow.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1236285"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}