Free Republic
Browse · Search
General/Chat
Topics · Post Article

Skip to comments.

White House urges developers to avoid C and C++, use 'memory-safe' programming languages
Tomshardware ^ | 02 28 2024 | Les Pounder

Posted on 02/28/2024 1:41:30 PM PST by yesthatjallen

The government would prefer it if you stopped programming tools in C or C++. In a new report, the White House Office of the National Cyber Director (ONCD) has called on developers to use "memory-safe programming languages," a category which excludes the popular languages. The advice is part of U.S. President Biden's Cybersecurity strategy and is a move to "secure the building blocks of cyberspace."

Memory safety refers to protection from bugs and vulnerabilities which deal with memory access. Buffer overflows and dangling pointers are examples of this. Java is considered a memory-safe language due to its runtime error detection checks. However, C and C++ both allow arbitrary pointer arithmetic with direct memory addresses and no bounds checking.

In 2019, Microsoft security engineers reported that around 70% of security vulnerabilities were caused by memory safety issues. Google reported the same figure in 2020, this time for bugs found in the Chromium browser.

" Experts have identified a few programming languages that both lack traits associated with memory safety and also have high proliferation across critical systems, such as C and C++," the report reads. "Choosing to use memory safe programming languages at the outset, as recommended by the Cybersecurity and Infrastructure Security Agency’s (CISA).

SNIP

(Excerpt) Read more at tomshardware.com ...


TOPICS:
KEYWORDS: c; programming; whitehouse
Navigation: use the links below to view more comments.
first previous 1-2021-4041-6061-68 next last
To: BereanBrain

” Don’t blame the paintbrush.”

DEEP thoughts ...... are you sure your in the right place?

8-)


41 posted on 02/28/2024 3:36:44 PM PST by 1of10 (be vigilant , be strong, be safe, be 1 of 10 .)
[ Post Reply | Private Reply | To 38 | View Replies]

To: yesthatjallen
I was about the 10th user world wide of a tool called Purify in 1991. It instruments and detects memory issues including write beyond the end of an array, using uninitialized data (reads), freeing a pointer to memory that has already been freed. My co-workers were dumping core almost daily in their X Windows C code. Applying Purify stomped those bugs out fast. Later, I used similar products from other vendors for Windows platforms. Same good results. For the typical Linux user, the "valgrind" tool does a very good job of dynamic memory defect detection. I use the open source "cppcheck" for initial static analysis and write code with SonarLint extensions for Visual Studio Code. It is hard to beat C/C++ for performance. A little care and you can have the performance without the bugs.

I have had some interest in "rust", "D" and clojure as "safe" languages. The problem is that none of the customer code is written in those languages. The real world stuff is C, C++, Java, FORTRAN and Ada. The Ada stuff comes from an attempt by DoD to push for Ada development. The FORTRAN stuff remains due to stable implementations of compute intensive algorithms that just "work" and can leverage a vectorized processor like a Cray.

42 posted on 02/28/2024 3:51:25 PM PST by Myrddin
[ Post Reply | Private Reply | To 1 | View Replies]

To: Myrddin

Thanks for the info.


43 posted on 02/28/2024 3:54:59 PM PST by linMcHlp
[ Post Reply | Private Reply | To 42 | View Replies]

To: DEPcom
I wonder if there is back doors in C#.

I've been writing in C# since 2000. It has a great type system and leverages lessons learned from Java and C++. When I could not lay hands on the Windows memory checking software, I opted to write my application using "managed" C#. The "managed" variant takes care of memory with a garbage collector similar to Java. It was fast enough to do voice recognition, voice synthesis, call processing and a geospatial database. When I have to do digital signal processing, I insist on C++ and the FFTW (Fastest Fourier in The West) library. I start with a MATLAB script that performs the operations correctly, but too slow for the application. Re-code the MATLAB algorithm using best practices in C++. Last time I needed to do that was 2005. MATLAB may be faster now.

44 posted on 02/28/2024 3:58:36 PM PST by Myrddin
[ Post Reply | Private Reply | To 8 | View Replies]

To: buwaya

Indeed. One of the reasons I never learned coding with decimal dollars and cents. Never wanted to do that kind. The Navy did well with Grace Hopper’s invention. They dreamed that someday we all would be able to code in English.

Years later they realized that most programmers don’t know English. Getting worse these days, too.


45 posted on 02/28/2024 3:59:47 PM PST by epluribus_2
[ Post Reply | Private Reply | To 36 | View Replies]

To: Empire_of_Liberty
But we have multi-gigahertz, multi-core processors and lithium batteries to make up for that!

Few people leverage the multi-core, multi-threaded capability of modern processors. I've done it for very specialized cases in both C++ and Java. You can do it nicely in Scala as well.

46 posted on 02/28/2024 4:02:34 PM PST by Myrddin
[ Post Reply | Private Reply | To 24 | View Replies]

To: yesthatjallen

Chromium is an open source browser that google uses for their Chrome browser and further developed into their Chrome Operating System for their Chromebook.

I have Chromium because I run Ubuntu, a type of Linux. My everyday browser is Waterfox, a privacy based version of Firefox.

Microsoft gave up on their own original Edge browser and now build Edge off of Chromium.

Chromium is a good open source basic browser and your complaints should be aimed a Chrome/Edge, not Chromium.


47 posted on 02/28/2024 4:07:30 PM PST by Pollard (#BoycottBlue)
[ Post Reply | Private Reply | To 1 | View Replies]

To: yesthatjallen

Just checksum the push pulls.


48 posted on 02/28/2024 4:09:26 PM PST by wgmalabama (Censored!)
[ Post Reply | Private Reply | To 1 | View Replies]

To: epluribus_2
Still think Python’s best for one and done or experimenting.

I favor Python for data science and machine learning tasks. Last year I did a project with ML written in Python running on an Azure cloud. Input/output was via REST methods to hide the interior details of the ML application.

I was on a technical challenge team that was given a database of all satellite orbits and all ship voyages over a 20 year time span. The task was to identify every ship that managed any segment of its voyage outside the view foot print of any satellites. It was a very intensive bit of processing. We successfully delivered the answer and won the proposal.

49 posted on 02/28/2024 4:09:27 PM PST by Myrddin
[ Post Reply | Private Reply | To 28 | View Replies]

To: yesthatjallen

There was only one really great programming language: ALGOL.


50 posted on 02/28/2024 4:37:18 PM PST by AndyJackson
[ Post Reply | Private Reply | To 1 | View Replies]

To: yesthatjallen

Most of my years as a software engineer we used C++. Developed some military applications with it.


51 posted on 02/28/2024 4:41:23 PM PST by McGruff (Don't underestimate Joe's ability to f*** things up - Barack Obama)
[ Post Reply | Private Reply | To 1 | View Replies]

To: yesthatjallen

Yeah right. When I see it on stackoverflow I’ll believe it. Until then I don’t trust the thing this government says.


52 posted on 02/28/2024 4:57:58 PM PST by jimjohn (We're at war, people. Start acting like it.)
[ Post Reply | Private Reply | To 1 | View Replies]

To: AndyJackson

Agree on ALGOL. Used that in my first Comp Sci course in 1970.


53 posted on 02/28/2024 4:58:15 PM PST by ken in texas
[ Post Reply | Private Reply | To 50 | View Replies]

To: rdcbn1
The last time I programmed Fortran it was for the Univac 1100 that ran the Shuttle Mission Simulator at Johnson Space Center.

Those were the days! :)

54 posted on 02/28/2024 5:03:59 PM PST by The Duke (Not without incident.)
[ Post Reply | Private Reply | To 13 | View Replies]

To: yesthatjallen
.. or .. C / C++ developers can just compile and link against the 'Purify' tool and have the program report its own memory leaks when it finishes running.

Actually, 'Purify' has probably been bought and sold a thousand times since I used it.

55 posted on 02/28/2024 5:05:51 PM PST by The Duke (Not without incident.)
[ Post Reply | Private Reply | To 1 | View Replies]

To: yesthatjallen

I used to do microcode floating point algorithms for IBM 360 machines for well log analysis. The rest of the coding was FORTRAN using punch-cards.

For small embedded systems what can you use except assembly and some sort of C/C++. (no comm)


56 posted on 02/28/2024 5:18:03 PM PST by Agatsu77
[ Post Reply | Private Reply | To 1 | View Replies]

To: yesthatjallen

FORTRAN forever!


57 posted on 02/28/2024 6:03:38 PM PST by grey_whiskers ( The opinions are solely those of the author and are subject to change without notice.)
[ Post Reply | Private Reply | To 1 | View Replies]

To: Myrddin

+1 for FORTRAN and Cray.

RIP Seymour.


58 posted on 02/28/2024 6:05:59 PM PST by grey_whiskers ( The opinions are solely those of the author and are subject to change without notice.)
[ Post Reply | Private Reply | To 42 | View Replies]

To: The Duke

I, also, programmed in Fortran (mostly) on a Univac at Johnson Space Center — related to retrospective interactive simulation of certain Skylab-related data and some other projects.

“Those were the days” for sure. (Being young helps!)

I loved eating lunch there in the big cafeteria. No telling who you would meet and get to talk to. Or more often, mainly listen to.

Half the time I would even understand half of what they told me!

That was around 1980-1982. I learned a lot. Really interesting nerd city!


59 posted on 02/28/2024 6:09:26 PM PST by Weirdad (Orthodox Americanism: It's what's good for the world! (Not communofascism!))
[ Post Reply | Private Reply | To 54 | View Replies]

To: rdcbn1

I still use FORTRAN on a regular basis.


60 posted on 02/28/2024 6:13:17 PM PST by kosciusko51
[ Post Reply | Private Reply | To 13 | View Replies]


Navigation: use the links below to view more comments.
first previous 1-2021-4041-6061-68 next last

Disclaimer: Opinions posted on Free Republic are those of the individual posters and do not necessarily represent the opinion of Free Republic or its management. All materials posted herein are protected by copyright law and the exemption for fair use of copyrighted works.

Free Republic
Browse · Search
General/Chat
Topics · Post Article

FreeRepublic, LLC, PO BOX 9771, FRESNO, CA 93794
FreeRepublic.com is powered by software copyright 2000-2008 John Robinson