Skip to content

Update try-catch block to give a more descriptive message when buffer allocation fails#76

Merged
jvillarre merged 1 commit into
Xilinx:masterfrom
snigdha-gupta:CR-1270980
May 27, 2026
Merged

Update try-catch block to give a more descriptive message when buffer allocation fails#76
jvillarre merged 1 commit into
Xilinx:masterfrom
snigdha-gupta:CR-1270980

Conversation

@snigdha-gupta
Copy link
Copy Markdown
Collaborator

Summary

When device buffer allocation fails, a std::bad_alloc is thrown which was previously caught only by a generic catch (...) that printed misleading warning "AIE trace is currently not supported on this platform". This message is incorrect for buffer allocation failure: the platform supports AIE trace; allocation failed due to insufficient device/CMA memory.

Solution

Add a dedicated catch (const std::bad_alloc&) before the existing catch (...) in AieTracePluginUnified::updateAIEDevice and report the existing allocation-failure warning. The generic catch (...) remains for other unexpected failures and still emits the platform “not supported” message.

Testing

Tested on VCK190 which now displays the correct warning message

…n allocation fails

Signed-off-by: snigupta <snigupta@amd.com>
@snigdha-gupta snigdha-gupta requested a review from jvillarre May 27, 2026 19:56
@jvillarre jvillarre merged commit fc9cb53 into Xilinx:master May 27, 2026
4 checks 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