× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Jerry Adams wrote:
It was been > 20 years since I did any C or Assembler, and never C# or Java so maybe someone could explain to me why things like "memory leaks" and "buffer overflows" seem to be more topical in those languages and Wintel platforms than here?

Memory leaks are more common in other languages because manually allocated memory is not commonly used in RPG. If it were used more frequently, I suspect that RPG would be just as prone to memory leakage as C.

Java is less prone to memory leaks because the garbage collector takes care of deallocating memory when it is no longer referenced. It is still quite possible to accidentally keep a reference to memory that should be deallocated, and I would consider this to be memory leak as well. See http://www.ibm.com/developerworks/java/library/j-leaks/.

Buffer overflow is really a very general term for a program overwriting memory that it is not supposed to overwrite. A couple of RPG examples would be the much cited parameter mismatch and passing the wrong "bytes provided" length to an API that returns a variable length structure. If you search "parameter mismatch" in the archives you'll see that buffer overflows are not unheard of in the RPG world.

The reason you hear more about buffer overflows on other platforms is that they can cause security problems. IBM i makes a distinction between pointers to data and pointer to executable code which other popular platforms do not. Simplistically, if an attacker can arrange to have the overflowing program write a jump instruction to memory, they can cause the system to execute arbitrary code of their choosing, with all of the permissions of the program that was running.



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.