Bug 1150 - Enabling boost::stacktrace corrupts srd session ID
Summary: Enabling boost::stacktrace corrupts srd session ID
Status: CONFIRMED
Alias: None
Product: PulseView
Classification: Unclassified
Component: Other (show other bugs)
Version: unreleased development snapshot
Hardware: All All
: Normal normal
Target Milestone: ---
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks: 1209
  Show dependency treegraph
 
Reported: 2018-04-05 22:29 CEST by Soeren Apel
Modified: 2018-05-25 11:19 CEST (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Soeren Apel 2018-04-05 22:29:05 CEST
When enabling boost::stacktrace on linux via -DENABLE_STACKTRACE=y, running a PD and closing PV results in a segfault:

--- stop_srd_session() called for 0xadc005b8 with session ID -1379921704
srd: Invalid session.
*** Error in `build/bin/pulseview': free(): invalid pointer: 0x0a5bfa48 ***
======= Backtrace: =========
/lib/libc.so.6(+0x6d3ef)[0xb609a3ef]
/lib/libc.so.6(+0x74df4)[0xb60a1df4]
/lib/libc.so.6(+0x755ce)[0xb60a25ce]
/usr/lib/libglib-2.0.so.0(g_free+0x1f)[0xb743785c]
/usr/lib/libglib-2.0.so.0(g_slist_foreach+0x24)[0xb744f2ef]
/usr/lib/libglib-2.0.so.0(g_slist_free_full+0x2c)[0xb744f328]
/home/abraxa/repositories/sigrok/build/lib/libsigrokdecode.so.4(srd_session_destroy+0x41)[0xb74ffd71]
build/bin/pulseview(_ZN2pv4data12DecodeSignal16stop_srd_sessionEv+0x125)[0x83b0095]
build/bin/pulseview(_ZN2pv4data12DecodeSignal12reset_decodeEv+0x10e)[0x83adb9e]
build/bin/pulseview(_ZN2pv4data12DecodeSignalD1Ev+0x39)[0x83ad8c9]
build/bin/pulseview(_ZN9__gnu_cxx13new_allocatorIN2pv4data12DecodeSignalEE7destroyIS3_EEvPT_+0x2e)[0x826b57e]

Without boost::stacktrace, the session ID for the PD is always 1 and there's no issue when closing PV. With it, the session ID is consistently -1379921704 (at least on my machine), causing the error above.