You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@yunikorn.apache.org by "Wilfred Spiegelenburg (Jira)" <ji...@apache.org> on 2022/03/16 04:30:00 UTC
[jira] [Resolved] (YUNIKORN-51) cast failures are not handled correctly
[ https://issues.apache.org/jira/browse/YUNIKORN-51?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Wilfred Spiegelenburg resolved YUNIKORN-51.
-------------------------------------------
Resolution: Not A Problem
All the offending code has been refactored or changes since this was logged.
I have not been able to find any cases that do not do the correct thing anymore.
> cast failures are not handled correctly
> ---------------------------------------
>
> Key: YUNIKORN-51
> URL: https://issues.apache.org/jira/browse/YUNIKORN-51
> Project: Apache YuniKorn
> Issue Type: Bug
> Components: core - scheduler
> Reporter: Wilfred Spiegelenburg
> Assignee: Sankeerthan Kasilingam
> Priority: Critical
> Labels: newbie
> Attachments: cast_panic.go
>
>
> While reviewing the code for YUNIKORN-47 I noticed that we are not correctly handling cast errors which could cause panics.
> In all cases we use the proper cast like this:
> {code:java}
> obj, ok := i.(*T)
> {code}
> We check the value of ok but do not handle the fact correctly that we can get a nil back which could cause a panic later when we us it.
> examples: {{scheduler.processNodeEvent()}}
> test code attached to show the issue.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@yunikorn.apache.org
For additional commands, e-mail: issues-help@yunikorn.apache.org