aboutsummaryrefslogtreecommitdiff
path: root/applications
diff options
context:
space:
mode:
authorMikael Olsson <mikael.olsson@arm.com>2024-04-02 17:20:47 +0200
committerMikael Olsson <mikael.olsson@arm.com>2024-04-02 17:20:47 +0200
commitf870d11f676f05e8e968e1a7f7d92269a73ef99a (patch)
tree3d67c43fbf43e49605bef4861440f02c2ec9ff94 /applications
parent10ecba81d7d5f2f969ac5112945e8f85517bd7fe (diff)
downloadethos-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>
Diffstat (limited to 'applications')
-rw-r--r--applications/message_handler_openamp/remoteproc.cpp2
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) {