Repository navigation
Conversation
…ion heap Certain titles look up process-wide scripting-heap entry points at runtime via dlsym for scriptingGetMem and scriptingFreeMem (NIDs ayuoL6Vjz2k and yV45DG6ei28). Export scriptingGetMem and scriptingFreeMem from libc, routing them to ApplicationHeapAlign and ApplicationHeapFree, and add unit test coverage in application_heap_tests. Closes boykopovar#694.
|
Which title calls |
|
Native Windows run, since no Windows results were posted. Setup: Windows 10 (19045), MinGW-w64 GCC 15.2.0 (WinLibs r7), Release. Head
🤖 Addressed by Claude Code |
adriadam10
left a comment
There was a problem hiding this comment.
Thanks. Changes needed:
- Windows build breaks (native run by @popcoder565, MinGW GCC 15.2, Release):
libc.prxfails the NID patch withduplicate patched export name: ayuoL6Vjz2k.scriptingGetMem/scriptingFreeMemareextern "C"and already named after the real symbols, so the patcher derives the NID from the plain name; MinGW exports every global, so theAPS5_EXPORTalias (ApplicationHeap.cpp:240,:245) yields the same NID twice. Drop bothAPS5_EXPORTlines and theExportMacros.hppinclude; with that the patchedlibc.prxexportsayuoL6Vjz2k/yV45DG6ei28and the full suite passes on Windows (519/519 in that build). Please confirm on Linux too. - @oneandonlydean's question is still open: which title calls
scriptingGetMem, and which console library exports it? If it comes from the title's own modules it doesn't belong in libc (see CONTRIBUTING: modules titles ship themselves are not reimplemented). Please answer it in the PR. - Fill in the PR template (
Tested,AI-assisted). - #1656 touches
ApplicationHeap.cpp; list it in Depends on if you build on it, and rebase after it lands.
|
Ready to merge from my side, but the PR description fails the conventions check:
Please fill those template lines in (only you can answer AI-assisted); it merges once they pass. |
|
Closing: the questions from 10-09 are still open (which title calls |
What
Certain titles perform a process-wide lookup for scripting heap entry points at runtime via
dlsym(NULL, "scriptingGetMem")anddlsym(NULL, "scriptingFreeMem")(NIDsayuoL6Vjz2kandyV45DG6ei28). The entry points were not exported.This exports
scriptingGetMem(alignment, size)andscriptingFreeMem(pointer)fromlibc, backed byApplicationHeapAlign_nid_no_patchandApplicationHeapFree_nid_no_patch. The names are the real symbols, so the NID comes from the name and noAPS5_EXPORTalias is needed.Closes #694.
Tested
Linux:
application_heap_tests(asserts the allocator callback gets the size and alignment, and that free reaches it), plus thelibcandlibsctest set (71 tests) on the PR rebased onto currentmain. Windows (MinGW GCC 15.2, Release) run by @popcoder565 reported the duplicate-export failure fixed by dropping the aliases. Not run on a title.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repository (attach them to this PR)