Validation layer: fall through/loss of error in two-call idiom
See original GitHub issueThe generated code for two-call idiom calls is producing a static analysis warning “Value stored to ‘xr_result’ is never read”. which is because it’s just falling through after setting xr_result instead of returning it or otherwise accumulating the error.
The code in question looks like:
// Optional array must be non-NULL when viewCapacityInput is non-zero
if (0 != viewCapacityInput && nullptr == views) {
CoreValidLogMessage(gen_instance_info, "VUID-xrEnumerateViewConfigurationViews-views-parameter",
VALID_USAGE_DEBUG_SEVERITY_ERROR, "xrEnumerateViewConfigurationViews",
objects_info,
"Command xrEnumerateViewConfigurationViews param views is NULL, but viewCapacityInput is greater than 0");
xr_result = XR_ERROR_VALIDATION_FAILURE;
}
// Non-optional pointer/array variable that needs to not be NULL
if (nullptr == viewCountOutput) {
CoreValidLogMessage(gen_instance_info, "VUID-xrEnumerateViewConfigurationViews-viewCountOutput-parameter",
VALID_USAGE_DEBUG_SEVERITY_ERROR, "xrEnumerateViewConfigurationViews", objects_info,
"Invalid NULL for uint32_t \"viewCountOutput\" which is not "
"optional and must be non-NULL");
return XR_ERROR_VALIDATION_FAILURE;
}
This is also triggering a later null dereference, when e.g. in the GenValidUsageInputsXrEnumerateSwapchainImages
function, that warning is printed, but then we go through to iterate the null container, etc.
Issue Analytics
- State:
- Created 4 years ago
- Comments:18 (7 by maintainers)
Top Results From Across the Web
Validation Error less than training error? - Cross Validated
In my case - batch-norm layers were the culprits. When I deleted them - training loss became similar to validation loss.
Read more >The OpenXR Specification - Khronos Registry
If the validation layer detects a problem, it issues an error message that can ... A two-call idiom may be employed, first calling...
Read more >GSM 04.08 - Version 5.0.0 - ETSI
Mobile radio interface layer 3 specification. (GSM 04.08). ETSI. European Telecommunications Standards Institute. ETSI Secretariat.
Read more >System Error Messages Guide For Access and Edge Routers ...
Code Explanation Fatal 0x8000 Signal loss Yes 0x4000 Hard error Yes ... a reply to another layer of ET-Analytics feature's software stack.
Read more >DGW Software Configuration Guide - Media5 Corporation
From the Severity drop-down list, for each service, ... Network-layer protocol phase: The Mediatrix unit negotiates an IP address.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I said:
You said:
I’m glad you agree with me. I’ll look into the generator.
Yep, sorry I missed it.