-
Notifications
You must be signed in to change notification settings - Fork 57
Fix four LP64 defects and add Oracle 19 client discovery #34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
AconiteX
merged 5 commits into
SWG-Source:64-bit-types
from
Galaxies-Reborn:x64-dx9-no-docker
Jul 26, 2026
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
55c8f22
Use fixed-width counts in the NetworkId and Unicode packed maps
swgsais ec3419d
Store call stack addresses at pointer width
swgsais 4fac50d
Back QueryPerformanceCounter with a monotonic clock
swgsais 750f7d8
Stop dereferencing a 32-bit frame offset in the SIGSEGV handler
swgsais a7c1459
Support Oracle 19 x64 Instant Client discovery
swgsais File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -682,11 +682,30 @@ bool DebugHelp::lookupAddress(uint64 address, char *libName, char *fileName, int | |
|
|
||
| // ---------------------------------------------------------------------- | ||
|
|
||
| void DebugHelp::getCallStack(uint32 *callStack, int sizeOfCallStack) | ||
| void DebugHelp::getCallStack(uint64 *callStack, int sizeOfCallStack) | ||
| { | ||
| //-- backtrace() writes sizeOfCallStack void* entries. Handing it the | ||
| // caller's buffer directly only works when sizeof(void*) happens to | ||
| // equal the element size; under LP64 it wrote 8 bytes per entry into a | ||
| // 4-byte-per-entry array and overran the buffer by 2x. Capture into a | ||
| // native pointer array and widen instead, which is correct for both | ||
| // ILP32 and LP64. | ||
| enum { cs_maximumFrameCount = 256 }; | ||
|
|
||
| if (sizeOfCallStack <= 0) | ||
| return; | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. source generally (but admittedly inconsistently) uses allman style bracing and doesn't tend to use indentation block syntax/off-side rule, so code like this would properly be (but again doesn't technically matter and would surely start a not so fun debate) if (sizeOfCallStack <= 0)
{
return;
} |
||
|
|
||
| for (int i = 0; i < sizeOfCallStack; ++i) | ||
| callStack[i] = 0; | ||
| IGNORE_RETURN(backtrace(reinterpret_cast<void **>(callStack), sizeOfCallStack)); | ||
|
|
||
| if (sizeOfCallStack > static_cast<int>(cs_maximumFrameCount)) | ||
| sizeOfCallStack = static_cast<int>(cs_maximumFrameCount); | ||
|
|
||
| void *frames[cs_maximumFrameCount]; | ||
| int const frameCount = backtrace(frames, sizeOfCallStack); | ||
|
|
||
| for (int i = 0; i < frameCount; ++i) | ||
| callStack[i] = reinterpret_cast<uint64>(frames[i]); | ||
| } | ||
|
|
||
| // ====================================================================== | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: this is functioning as a magic number, so could instead be at top of file, even though it is scoped and only relevant to the single function so it's 50/50 (I also don't love use of an untyped enum here since the compiler then has to make an inference and god knows what it may do in the future); alternatively, e.g., at top of file: