Opened on 01/23/23 at 11:43:56
Last modified on 01/24/23 at 15:54:37
#4819 assigned defect
Unclear #IF 1 Clause in File: Possible Error
Reported by: | Daniel Páscoa | Owned by: | Needs Funding |
---|---|---|---|
Priority: | normal | Milestone: | 7.1 |
Component: | unspecified | Version: | 6 |
Severity: | normal | Keywords: | qualification |
Cc: | Blocked By: | ||
Blocking: |
Description (last modified by Sebastian Huber)
Description:
It has been noticed that the noted file contains an #IF 1 clause that has been implemented in an unclear manner, and with a comment about a possible error. It is recommended to verify the necessity of this clause in the file, and if it is not needed, remove it. It's also important to clarify the possible error to avoid confusion in the future.
The attached excel lists in a systematic way the sources where this issue applies.
Additional Notes:
This ticket was raised as an outcome of the Independent SW Verification and Validation (ISVV) for ESA-promoted RTEMS SMP Qualification Data Packs (https://rtems-qual.io.esa.int). Original ISVV reference for this issue is RTEMS-SMP-CODE-VER-071.
File list (please check the attached excel for more information):
cpukit\rtems\src\msgqconstruct.c
Code block
#if defined(RTEMS_MULTIPROCESSING) if ( _System_state_Is_multiprocessing ) { is_global = _Attributes_Is_global( config->attributes ); } else { is_global = false; } #if 1 /* * I am not 100% sure this should be an error. * It seems reasonable to create a que with a large max size, * and then just send smaller msgs from remote (or all) nodes. */ if ( is_global ) { size_t max_packet_payload_size = _MPCI_table->maximum_packet_size - MESSAGE_QUEUE_MP_PACKET_SIZE; if ( config->maximum_message_size > max_packet_payload_size ) { return RTEMS_INVALID_SIZE; } } #endif #endif
Analysis
The check is superfluous since the send directives check this also. It just prevents local messages from having a larger size. I would remove the check.
Attachments (1)
Change History (5)
Changed on 01/23/23 at 11:44:08 by Daniel Páscoa
Attachment: | RTEMS-SMP-CODE-VER-071.xlsx added |
---|
comment:1 Changed on 01/23/23 at 13:06:26 by Sebastian Huber
Keywords: | qualification added |
---|
comment:2 Changed on 01/24/23 at 10:30:12 by Sebastian Huber
Component: | admin → unspecified |
---|---|
Milestone: | → 7.1 |
Owner: | set to Needs Funding |
Status: | new → assigned |
Version: | → 6 |
comment:3 Changed on 01/24/23 at 15:54:23 by Sebastian Huber
Description: | modified (diff) |
---|
comment:4 Changed on 01/24/23 at 15:54:37 by Sebastian Huber
Description: | modified (diff) |
---|