You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the call to OSMemCreate(), if arg checking is enabled, the pointer to the start of the partition is cast to an integer in order to verify its aligned to store pointers.
When I compile this on a 64bit system I get compiler warnings about the cast to a smaller type. uC-CPU defines an OS_ADDR type, which would be ideal to use here, but uC-OS2 isn't required to use it. My workaround so far has been to add a similar typedef in os_cpu.h (along with the others like INT32U currently used in the cast).
To reproduce; compile os_mem.c on Ubuntu 18.04 (64bit) using gcc 7.5.0.
Thank you for reporting this.
Unfortunately, there is no easy way for us to resolve it.
We are reluctant to include a dependency on uC-CPU for legacy support reasons.
Neither can we use INT64U because it is only defined for a couple of ports.
Because this is an edge-case, the best approach in our opinion is to document it as an errata with a workaround for those who encounter it.
@heyneman There are a couple of issues that hold us back from adding this change:
The sheer number of ports makes it infeasible to test the change for each port.
We would be changing a function signature for a product that has a long history of use in safety-critical applications. This is something we would prefer to avoid if possible due to the impact it may have on certification.
The vast majority of architectures we target are 32-bit. For the exceptions, such as ARM64, the workaround can be applied on a case-by-case basis by the end-user.
In the call to
OSMemCreate()
, if arg checking is enabled, the pointer to the start of the partition is cast to an integer in order to verify its aligned to store pointers.When I compile this on a 64bit system I get compiler warnings about the cast to a smaller type. uC-CPU defines an
OS_ADDR
type, which would be ideal to use here, but uC-OS2 isn't required to use it. My workaround so far has been to add a similar typedef in os_cpu.h (along with the others like INT32U currently used in the cast).To reproduce; compile os_mem.c on Ubuntu 18.04 (64bit) using gcc 7.5.0.
uC-OS2/Source/os_mem.c
Line 106 in 28c58eb
The text was updated successfully, but these errors were encountered: