summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRaquel Medina <raquel.medina@konsulko.com>2019-11-05 22:27:00 +0100
committerRaquel Medina <raquel.medina@konsulko.com>2019-11-05 22:34:33 +0100
commit8fc89375f7d8676993d379c0f80674558217ed95 (patch)
tree03d4832882e98b42c2c87065de7f4624461b5f9f
parent1cea0461007c224c543df1cd4f530a3f3d2a592e (diff)
alexa-voice-agent-service: fix segmentation fault in release mode
Bug-AGL: SPEC-2873 Change-Id: Ib341ed8f34c8b267b0df122348b569161e22cf87 Signed-off-by: Raquel Medina <raquel.medina@konsulko.com>
-rw-r--r--meta-speech-framework/meta-aac/recipes-apis/alexa-voiceagent-service/alexa-voiceagent-service/0005-fix-segmentation-fault-for-release-build-mode.patch33
-rw-r--r--meta-speech-framework/meta-aac/recipes-apis/alexa-voiceagent-service/alexa-voiceagent-service_git.bb1
2 files changed, 34 insertions, 0 deletions
diff --git a/meta-speech-framework/meta-aac/recipes-apis/alexa-voiceagent-service/alexa-voiceagent-service/0005-fix-segmentation-fault-for-release-build-mode.patch b/meta-speech-framework/meta-aac/recipes-apis/alexa-voiceagent-service/alexa-voiceagent-service/0005-fix-segmentation-fault-for-release-build-mode.patch
new file mode 100644
index 00000000..5012dfe8
--- /dev/null
+++ b/meta-speech-framework/meta-aac/recipes-apis/alexa-voiceagent-service/alexa-voiceagent-service/0005-fix-segmentation-fault-for-release-build-mode.patch
@@ -0,0 +1,33 @@
+Fix segmentation fault for release build mode
+
+'int IAFBApi::callSync(...)' is missing a return
+statement. When the sdk is compiled in release mode
+executing this code results in a segmentation fault.
+
+According to the C++ standard, a return statement is
+required on a function that returns a non-void value.
+Specifically: <<Flowing off the end of a function is
+equivalent to a return with no value; this results in
+undefined behaviour in a value-returning function.>>
+
+The proposed fix provides the missing return statement
+for IAFBApi's callSync method.
+
+Upstream-Status: Pending
+
+Signed-off-by: Raquel Medina <raquel.medina@konsulko.com>
+
+diff --git a/platforms/agl/alexa-voiceagent-service/src/plugins/afb/AFBApiImpl.cpp b/platforms/agl/alexa-voiceagent-service/src/plugins/afb/AFBApiImpl.cpp
+index 5ed9bce..e68ef7f 100644
+--- a/src/plugins/afb/AFBApiImpl.cpp
++++ b/src/plugins/afb/AFBApiImpl.cpp
+@@ -77,6 +77,8 @@ int AFBApiImpl::callSync(
+ info = infoStr;
+ free(infoStr);
+ }
++
++ return rc;
+ }
+
+ /// Shim to transfer C++ function to C callback using void*
+
diff --git a/meta-speech-framework/meta-aac/recipes-apis/alexa-voiceagent-service/alexa-voiceagent-service_git.bb b/meta-speech-framework/meta-aac/recipes-apis/alexa-voiceagent-service/alexa-voiceagent-service_git.bb
index 92b54e22..2e68bbf7 100644
--- a/meta-speech-framework/meta-aac/recipes-apis/alexa-voiceagent-service/alexa-voiceagent-service_git.bb
+++ b/meta-speech-framework/meta-aac/recipes-apis/alexa-voiceagent-service/alexa-voiceagent-service_git.bb
@@ -24,6 +24,7 @@ SRC_URI = "git://github.com/alexa/alexa-auto-sdk.git;protocol=https;branch=2.0 \
file://0002-update-config.xml.in.patch \
file://0003-update-audio-device-configuration.patch \
file://0004-update-config-and-database-paths.patch \
+ file://0005-fix-segmentation-fault-for-release-build-mode.patch \
"
SRCREV = "86916d2d8c1702a8be3c88a9012ca56583bcc0c8"