Repository navigation
Read the J-Link version from the library's real file name - #277
Open
TheArkadiuszGrzelka wants to merge 1 commit into
Open
TheArkadiuszGrzelka wants to merge 1 commit into
TheArkadiuszGrzelka wants to merge 1 commit into
Conversation
SEGGER's Linux package links /opt/SEGGER/JLink to JLink_V950/. When the library is loaded through the link (LD_LIBRARY_PATH=/opt/SEGGER/JLink or an explicit dllpath), its path has no JLink_V<n> part, so dll_version() returns None and load() copies the 29 MB library into /tmp on every Library(). On Linux, unload() never dlcloses the copy, so deleted copies stay mapped and a process creating a JLink per probe scan fills /tmp. dll_version() now falls back to the file the path resolves to, libjlinkarm.so.9.50.0, and reads the version from its name. Signed-off-by: Arkadiusz Grzelka <arkadiusz.grzelka@arivemb.com>
TheArkadiuszGrzelka
marked this pull request as ready for review
October 23, 2026 07:35
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
SEGGER's Linux package symlinks
/opt/SEGGER/JLinktoJLink_V950/. Loaded through that link (LD_LIBRARY_PATHordllpath), the path has noJLink_V<n>part, sodll_version()returnsNoneandload()copies the 29 MB library into/tmpon everyLibrary().unload()never callsdlcloseon the copy, so a process that creates aJLinkper probe scan (pyOCD does) fills/tmp.dll_version()now falls back to the resolved file,libjlinkarm.so.9.50.0, and reads the version from its name.Tested on Linux with the real V9.50
.deblibrary: 467 unit tests OK. The two new tests fail onmasterwithNone != 9.5.