mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-27 13:40:29 +02:00
FpDebug: Add safeguard/error-checks to TDwarfInformationEntry.PrepareAbbrev / PrepareAbbrevData. Issue #41459
This commit is contained in:
parent
a8a1fc1666
commit
0530a14bd5
@ -2768,7 +2768,7 @@ end;
|
|||||||
|
|
||||||
procedure TDwarfInformationEntry.PrepareAbbrev;
|
procedure TDwarfInformationEntry.PrepareAbbrev;
|
||||||
begin
|
begin
|
||||||
if dieAbbrevValid in FFlags then
|
if (dieAbbrevValid in FFlags) or (FInformationEntry = nil) then
|
||||||
exit;
|
exit;
|
||||||
FInformationData := FCompUnit.FAbbrevList.FindLe128bFromPointer(FInformationEntry, FAbbrev);
|
FInformationData := FCompUnit.FAbbrevList.FindLe128bFromPointer(FInformationEntry, FAbbrev);
|
||||||
Include(FFlags, dieAbbrevValid);
|
Include(FFlags, dieAbbrevValid);
|
||||||
@ -2783,6 +2783,9 @@ function TDwarfInformationEntry.PrepareAbbrevData: Boolean;
|
|||||||
var
|
var
|
||||||
AbbrList: TDwarfAbbrevList;
|
AbbrList: TDwarfAbbrevList;
|
||||||
begin
|
begin
|
||||||
|
if FInformationEntry = nil then
|
||||||
|
exit(False);
|
||||||
|
|
||||||
Result := FAbbrevData <> nil;
|
Result := FAbbrevData <> nil;
|
||||||
if dieAbbrevDataValid in FFlags then
|
if dieAbbrevDataValid in FFlags then
|
||||||
exit;
|
exit;
|
||||||
|
Loading…
Reference in New Issue
Block a user