diff options
author | Mikael Olsson <mikael.olsson@arm.com> | 2024-04-02 17:20:47 +0200 |
---|---|---|
committer | Mikael Olsson <mikael.olsson@arm.com> | 2024-04-02 17:20:47 +0200 |
commit | f870d11f676f05e8e968e1a7f7d92269a73ef99a (patch) | |
tree | 3d67c43fbf43e49605bef4861440f02c2ec9ff94 | |
parent | 10ecba81d7d5f2f969ac5112945e8f85517bd7fe (diff) | |
download | ethos-u-core-platform-f870d11f676f05e8e968e1a7f7d92269a73ef99a.tar.gz |
Fix Rpmsg constructor not initializing members
The constructor for the Rpmsg class does not zero-initialize its member
variables. This causes issues with the remoteproc library because it
thinks function pointers in the variables are set to valid functions
when they are actually just uninitialized values and using these
function pointer causes crashes and unexpected behavior.
To resolve this, the Rpmsg class constructor has been changed to
zero-initialize all its member variables.
Change-Id: Ic34fd52bc39ed3018e5f67474949f10adc8cb7a8
Signed-off-by: Mikael Olsson <mikael.olsson@arm.com>
-rw-r--r-- | applications/message_handler_openamp/remoteproc.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/applications/message_handler_openamp/remoteproc.cpp b/applications/message_handler_openamp/remoteproc.cpp index ed6f7d0..599452b 100644 --- a/applications/message_handler_openamp/remoteproc.cpp +++ b/applications/message_handler_openamp/remoteproc.cpp @@ -160,7 +160,7 @@ int RProc::notify(remoteproc *rproc, uint32_t id) { * Rpmsg *****************************************************************************/ -Rpmsg::Rpmsg(RProc &rproc, const char *const name) { +Rpmsg::Rpmsg(RProc &rproc, const char *const name) : rvdev({}), rdev(), endpoint({}) { struct virtio_device *vdev = rproc.getVDev(); if (vdev->vrings_num != ResourceTable::NUM_VRINGS) { |