Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

More of my philosophy about memory safety and more..

13 views
Skip to first unread message

Amine Moulay Ramdane

unread,
Aug 25, 2021, 6:56:08 PM8/25/21
to


Hello,


More of my philosophy about memory safety and more..

I am a white arab from Morocco, and i think i am smart since i have also
invented many scalable algorithms and algorithms..

You can read more about my education and my way of doing here:

Here is more proof of the fact that i have invented many scalable algorithms and algorithms:

https://groups.google.com/g/comp.programming.threads/c/V9Go8fbF10k

And I have just read the following webpage about "Fearless Security: Memory safety":

https://hacks.mozilla.org/2019/01/fearless-security-memory-safety/

Here is the memory safety problems:

1- Misusing Free (use-after-free, double free)

I have solved this in Delphi and Freepascal by inventing a "Scalable" reference counting with efficient support for weak references.

You can download it from my website here:

https://sites.google.com/site/scalable68/scalable-reference-counting-with-efficient-support-for-weak-references

2- Uninitialized variables

This can be detected by the compilers of Delphi and Freepascal.

Or you can use my Null safety library for Delphi and Freepascal here:

https://sites.google.com/site/scalable68/null-safety-library-for-delphi-and-freepascal

3- Dereferencing Null pointers

I have solved this in Delphi and Freepascal by inventing a "Scalable" reference counting with efficient support for weak references.

You can download it from my website here:

https://sites.google.com/site/scalable68/scalable-reference-counting-with-efficient-support-for-weak-references

4- Buffer overflow and underflow

This has been solved in Delphi by using madExcept, read here about it:

http://help.madshi.net/DebugMm.htm

You can buy it from here:

http://www.madshi.net/

There is another way is to use my following technic that you can generalize when you copy from arrays of different types, i will
explain it to you in my next post:

About the buffer overflow problem..

I wrote yesterday about buffer overflow in Delphi and Freepascal..

I think there is a "higher" abstraction in Delphi and Freepascal
that does the job very well of avoiding buffer overflow, and it is
the TMemoryStream class, since it behaves also like a pointer
and it supports reallocmem() and freemem() on the pointer but
with a higher level abstraction, look for example at my
following example in Delphi and Freepascal, you will notice
that contrary to pointers , that the memory stream is adapting with writebuffer() without the need of reserving the memory, and this is why it avoids the buffer overflow problem, read the following example to notice how i am using it with a PAnsichar type:

========================================


Program test;


uses system.classes,system.sysutils;


var P: PAnsiChar;


Begin


P:='Amine';


mem:=TMemorystream.create;

mem.position:=0;

mem.writebuffer(pointer(p)^,6);

mem.position:=0;

writeln(PAnsichar(mem.memory));



end.


===================================



Thank you,
Amine Moulay Ramdane.

0 new messages