Wind River Support Network

HomeDefectsLIN5-17239
Fixed

LIN5-17239 : libunwind throws assert implying potential buffer overrun

Created: Mar 18, 2013    Updated: Mar 10, 2016
Resolved Date: Dec 2, 2013
Found In Version: 5.0.1
Fix Version: 5.0.1.3,Invalid Version
Severity: Severe
Applicable for: Wind River Linux 5
Component/s: Workbench Integration

Description

After altering the recipe for libunwind to enable assertions as shown in Steps, running an application the invokes the libunwind throws an assert:
mi/init.c: assert failed: sizeof (struct cursor) <= sizeof (unw_cursor_t)

This implies that the opaque buffer that fills the structure cursor is not large enough.

The failure with qemuppc, fsl-p2020, and also when building qemuppc in a pure yocto-poky-denzil environment.

Steps to Reproduce

edit layers/wr-tools-profile/recipes-wr-tools-profile/libunwind/libunwind.inc with the following changes
--- a/recipes-wr-tools-profile/libunwind/libunwind.inc
+++ b/recipes-wr-tools-profile/libunwind/libunwind.inc
@@ -19,4 +19,4 @@ inherit autotools
 INHIBIT_PACKAGE_DEBUG_SPLIT := "1"
 INHIBIT_PACKAGE_STRIP := "1"

-EXTRA_OECONF = "--enable-debug-frame=yes"
+EXTRA_OECONF = "--enable-debug-frame=yes --enable-debug"

configure --enable-build=debug --enable-board=qemuppc --enable-kernel=standard --enable-rootfs=glibc-small+gdb --enable-jobs=8 --enable-parallel-pkgbuilds=8 --with-layer=/path-
to-cloned/wrll-analysis-tests/wr-tools-profile-test 
make fs
make start-target
cd /opt/tests/libunwind-tests
./frame-layouts
# note error

Other Downloads


Live chat
Online