cnpack / cnvcl

CnPack VCL Components

Home Page:http://www.cnpack.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CnWaterEffect.pas

davornik opened this issue · comments

When ASLR is on in project (Delphi Alexandria 11.3) access violation occurs on rendering image on line
...
c := PSrcDot.rgbtBlue - dx;
...

More on ASLR:
https://en.wikipedia.org/wiki/Address_space_layout_randomization

Some further reading:
https://en.delphipraxis.net/topic/7968-how-does-the-address-space-randomization-aslr-actually-work/

It seams that some code is not properly sized (Integer -> Int64)? Hope that author will update and solve this small issue.

Can't reproduce this problem. Is it the latest version on master branch?

We've already change some 64bit adaption before, such as TCnNativePointer usage.
Do you use 32-bit or 64 bit compiling mode?

As I understood ASLR is only for 64-bit apps. Maybe I'm mistaking, anyway I used 64-bit compiling mode.
Yes, I see that you use TCnNativePointer like
type
TCnNativePointer = Integer;
or
TCnNativePointer = NativeUInt;
I use cnWaterEffect without CnNative, so I have replaced TCnNativePointer with Integer. I will do some further testing, perhaps it needs to be NativeUInt.

All ok, if I don't want to use TCnNativePointer, then it needs to be replaced with NativeUInt.