Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Programmieren allgemein (https://www.delphipraxis.net/40-programmieren-allgemein/)
-   -   Win64 Zugriffsverletzungen bei High-Entropy für 64-Bit-ASLR (https://www.delphipraxis.net/214747-win64-zugriffsverletzungen-bei-high-entropy-fuer-64-bit-aslr.html)

omp 3. Mär 2024 09:29

Win64 Zugriffsverletzungen bei High-Entropy für 64-Bit-ASLR
 
Hallo.
Ich stelle ein größeres Projekt von Delphi 10.4 auf 12 um.
In Windows 64 stoße ich auf ein Problem bei den Drag&Drop-Funktionen.

Code:
procedure TtaoController.DefaultHandler(var Message);
begin
  inherited DefaultHandler(Message);
  if Assigned(FOldWindowProc) then
    FOldWindowProc(TMessage(Message)); // Zugriffsverletzung
end;
Ich dachte erst an "weak alias" Integer/NativeInt ab Delphi 12.
Es steht aber eher im Zusammenhang mit "Support high-entropy 64-bit ASLR" ab Delphi 11.2
Wird ASLR deaktiviert, tritt der Fehler nicht auf. Ich gehe davon aus, dass ein Integer
nicht korrekt bzw. mit einem falschen Alias deklariert ist. Integer statt Pointer, DWORD o.ä.

Mir ist klar, dass obiger Auszug "etwas dürftig" für eine Problembeschreibung ist.
Ich frage aber trotzdem, ob sich jemand mit dem Thema genauer beschäftigt hat und
mich auf den richtigen Weg führen kann.

Besten Dank, Harald

Kas Ob. 3. Mär 2024 10:59

AW: Win64 Zugriffsverletzungen bei High-Entropy für 64-Bit-ASLR
 
Hi,

The short "// Zugriffsverletzung" or "// access violation" not enough and not helpful, the full message will be more useful.

Also the stack at this point, because the exact point of the raised exception is not visible here, it could be FOldWindowProc assigned to some already not allocated memory, hence the AV, or within the FOldWindowProc and there wasn't debug information and the your debugger showed this point.

And then there is this question :
Are you sure that you need to call "inherited DefaultHandler(Message)" and then reprocess the message again with "FOldWindowProc(TMessage(Message))" ?


Alle Zeitangaben in WEZ +1. Es ist jetzt 16:44 Uhr.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz