Re: [zeromq-dev] czmq: Error Traceability with assert(...) and release code

2014-03-10 Thread Ivan Pechorin
assert() gives you a core dump that has complete context, including stack trace. How do you propose to provide the same, if you replace assert with return? On 11/03/2014 12:10 AM, "Christoph Zach" wrote: > On Monday 10 March 2014 10:36:22 Pieter Hintjens wrote: > > This theory is fine in theory.

Re: [zeromq-dev] czmq: Error Traceability with assert(...) and release code

2014-03-10 Thread Pieter Hintjens
On Mon, Mar 10, 2014 at 12:10 PM, Christoph Zach wrote: > So by simply assert() and exit() the application the points 6, 5 and 4 have > just been violated. To solve this issue all the assert(...) statements could > be replaced e.g. with ZMQ_ASSERT( toAssert, message ). For sure. You're free to f

Re: [zeromq-dev] czmq: Error Traceability with assert(...) and release code

2014-03-10 Thread Christoph Zach
On Monday 10 March 2014 10:36:22 Pieter Hintjens wrote: > This theory is fine in theory. Please note that all the theoretical stuff I wrote is based on real-world projects, which have high requirements on safety and software resilience. Here's a requirement excerpt from one of our projects: 1) Yo

Re: [zeromq-dev] czmq: Error Traceability with assert(...) and release code

2014-03-10 Thread Pieter Hintjens
This theory is fine in theory. In practice, could you provide a case that reproduces the crash you got? On Mon, Mar 10, 2014 at 10:10 AM, Christoph Zach wrote: > On Friday 07 March 2014 17:36:21 Pieter Hintjens wrote: >> On Fri, Mar 7, 2014 at 3:13 PM, Christoph Zach >> wrote: >> >> > To furth

Re: [zeromq-dev] czmq: Error Traceability with assert(...) and release code

2014-03-10 Thread Christoph Zach
On Friday 07 March 2014 17:36:21 Pieter Hintjens wrote: > On Fri, Mar 7, 2014 at 3:13 PM, Christoph Zach > wrote: > > > To further use zyre/czmq We are planing on replacing all the assert(...) > > statements > > with actual error handling routines. > > As Olaf explains, the asserts cannot ever

Re: [zeromq-dev] czmq: Error Traceability with assert(...) and release code

2014-03-07 Thread Pieter Hintjens
On Fri, Mar 7, 2014 at 3:13 PM, Christoph Zach wrote: > To further use zyre/czmq We are planing on replacing all the assert(...) > statements > with actual error handling routines. As Olaf explains, the asserts cannot ever happen in practice unless there is a coding bug in your app or in CZMQ.

Re: [zeromq-dev] czmq: Error Traceability with assert(...) and release code

2014-03-07 Thread Olaf Mandel
Am 07.03.2014 15:13, schrieb Christoph Zach: > We are currently planing on using czmq (directly and implicitly via zyre) to > implement > some distributed services. By browsing the demo applications and the source > We found out that there are various places where 'assert( ... )' is used. > Thi

[zeromq-dev] czmq: Error Traceability with assert(...) and release code

2014-03-07 Thread Christoph Zach
Hi Guys, We are currently planing on using czmq (directly and implicitly via zyre) to implement some distributed services. By browsing the demo applications and the source We found out that there are various places where 'assert( ... )' is used. This caused one of the demo applications (compil