gabr42 / gabr42/GpDelphiUnits

X64-Bug in TGpHugeFile

Open
#4 0 comments 0 reactions 0 assignees View on GitHub
auto-migrated Priority-Medium Type-Defect
Dominant language
Pascal
Stars
190
Forks
63
PR merge metrics
No merged PRs in 30d

Description

```
In Unit GpHugeF.pas

the method OffsetPtr calculate a address in DWORD. This will fail in x64 and
high pointers.

Suggestion is ...

function OffsetPtr(ptr: pointer; offset: DWORD): pointer;
begin
//BUG Result := pointer(DWORD(ptr)+offset);
Result := pointer(NativeUInt(ptr)+offset);
end; { OffsetPtr }

```

Original issue reported on code.google.com by `mxxa2a...@gmail.com` on 25 Mar 2015 at 8:48

Contributor guide

No contributing guide indexed for this repository

Research direction

Start in Unit GpHugeF.pas and inspect the OffsetPtr method, especially its DWORD-based address calculation and the suggested NativeUInt alternative. Done means OffsetPtr preserves high pointer addresses on x64; verify this against the unit's available build or validation process.

Written by the indexing model from the issue text.

Assessment

Domain
tooling
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.