ndsev / zserio

zero sugar, zero fat, zero serialization overhead
https://zserio.org/
BSD 3-Clause "New" or "Revised" License
108 stars 26 forks source link

Big Parameters passed by value(more than the threshold value of 128 bytes) #657

Closed bhanuprakasheagala-at-mbrdi closed 1 week ago

bhanuprakasheagala-at-mbrdi commented 3 weeks ago

Zserio version and language Zserio: 2.1.2 Language: C++

Describe the bug As per the documentation of Zserio, it can support up to 64 bytes of data. But there is an issue found from nds where there is 144 bytes of data getting sent through some type traits concept at compiler\extensions\cpp\runtime\src\zserio\Array.h.

https://github.com/ndsev/zserio/blob/master/compiler/extensions/cpp/runtime/src/zserio/Array.h

image

As per the Autosar guidelines checker, it has found the size passed as144 bytes. However, it's allowed threshold is 128 bytes of data. Here, the size of Element Type is more than the supported size. The issue is due to large size of data being passed as a value instead of pass by reference.

mikir commented 3 weeks ago

OK, thanks a lot to point this out! We will plan to have a look to this issue during the current milestone.