genode/repos/os
Martin Stein 49184fb938 net: circumvent stringop-overflow error
With the update to GCC 10, the compiler stopped with an error when compiling
places where a MAC address is copied from outside into a packed object using
the Net::Netaddress::copy method (e.g. in
Net::Arp_packet::dst_mac(Mac_address)):

! error: writing 6 bytes into a region of size 4 [-Werror=stringop-overflow=]

While trying to find a clean solution for this error, I found posts on
gcc.gnu.org and github that stated that the size calculations that cause these
errors are incorrect. Indeed, I could verify that the actual size of the two
regions was static and exactly the same in places were the error occured.

Furthermore, I couldn't find a way of making it more clear to the compiler
that the sizes are the same. By accident, we found that using the address of
the first element of the array that forms the second region instead of the
array address itself, somehow circumvents the error.

Fixes #4109
2021-05-05 11:35:31 +02:00
..
doc Remove <configfile> feature from init 2020-05-18 10:16:13 +02:00
include net: circumvent stringop-overflow error 2021-05-05 11:35:31 +02:00
lib sandbox/init: parse config using 'List_model' 2021-04-20 12:03:04 +02:00
recipes platform driver: make device info XML optional 2021-05-05 11:31:16 +02:00
run event_filter: add new test cases 2021-05-05 11:35:29 +02:00
src net: fix packed-conversion compiler warning 2021-05-05 11:35:31 +02:00
xsd nic drivers: provide optional Uplink-client mode 2021-01-25 13:58:09 +01:00
README API documentation refinements 2017-05-31 13:16:21 +02:00

This source-code repository contains genuine low-level OS components and
interfaces of Genode. It solely depends on the framework's base API.