From: Arkadiusz Miƛkiewicz Date: Sat, 9 Mar 2013 17:07:02 +0000 (+0100) Subject: - rel 2; segfault fix when building without debug X-Git-Tag: auto/th/pulseview-0.1-0.a7553da.2 X-Git-Url: http://git.pld-linux.org/?a=commitdiff_plain;h=856ba7551af94d5245c4957ce4da8c62450d2991;p=packages%2Fpulseview.git - rel 2; segfault fix when building without debug --- diff --git a/pulseview-build.patch b/pulseview-build.patch index 069da4c..b874f78 100644 --- a/pulseview-build.patch +++ b/pulseview-build.patch @@ -5,7 +5,7 @@ { shared_ptr signal; - uint64_t *sample_rate; -+ uint64_t *sample_rate = 0; ++ uint64_t *sample_rate = NULL; unsigned int logic_probe_count = 0; unsigned int analog_probe_count = 0; @@ -43,3 +43,26 @@ ) add_executable(pulseview-test +commit 4b963e7f126d2a13c4a4156fe1cfa8000c00fec0 +Author: Joel Holdsworth +Date: Sat Mar 9 16:52:04 2013 +0000 + + Ensure sr_config_get is called even when assert is compiled out + +diff --git a/pv/sigsession.cpp b/pv/sigsession.cpp +index a9da7bf..8f482f6 100644 +--- a/pv/sigsession.cpp ++++ b/pv/sigsession.cpp +@@ -195,8 +195,10 @@ void SigSession::feed_in_header(const sr_dev_inst *sdi) + + // Read out the sample rate + assert(sdi->driver); +- assert(sr_config_get(sdi->driver, SR_CONF_SAMPLERATE, +- (const void**)&sample_rate, sdi) == SR_OK); ++ ++ const int ret = sr_config_get(sdi->driver, SR_CONF_SAMPLERATE, ++ (const void**)&sample_rate, sdi); ++ assert(ret == SR_OK); + + // Create data containers for the coming data snapshots + { diff --git a/pulseview.spec b/pulseview.spec index 2f91424..1733008 100644 --- a/pulseview.spec +++ b/pulseview.spec @@ -6,7 +6,7 @@ Summary: Qt based logic analyzer GUI for sigrok Name: pulseview Version: 0.1 -Release: 0.%{snap}.1 +Release: 0.%{snap}.2 License: GPL Group: X11/Applications/Graphics # Source0: http://sigrok.org/gitweb/?p=pulseview.git;a=snapshot;h=%{snap};sf=tgz;/%{name}-%{snap}.tar.gz