Skip to content

Linker: Add better exception handling and safer operations#39

Merged
scheibelp merged 1 commit into
spack:mainfrom
johnwparent:linker-exception-saftey
May 20, 2026
Merged

Linker: Add better exception handling and safer operations#39
scheibelp merged 1 commit into
spack:mainfrom
johnwparent:linker-exception-saftey

Conversation

@johnwparent
Copy link
Copy Markdown
Collaborator

Wrap all calls that can potentially raise so we can instead forward a clean error case

Ensure all path operations in createRC use dynamic arrays instead of cstyle arrays and add explicit handling for long paths

Wrap all calls that can potentially raise so we can instead forward a clean error case

Ensure all path operations in createRC use dynamic arrays instead of cstyle arrays and add explicit handling for long paths

Signed-off-by: John Parent <john.parent@kitware.com>
Comment thread src/ld.cxx
link_run.makeRsp();
} catch (const FileIOError& e) {
return ExitConditions::FILE_IO_FAILURE;
}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Follow-up: see if we can get traceback when exceptions are thrown

Or: surround whole method in try/catch, then unwrap for more info

@scheibelp scheibelp merged commit 8faa607 into spack:main May 20, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants