Mailinglist Archive: zypp-devel (57 mails)
| < Previous | Next > |
Re: [zypp-devel] Re: sat-solver must not abort()
- From: Michael Schroeder <mls@xxxxxxx>
- Date: Tue, 8 Jan 2008 18:06:56 +0100
- Message-id: <20080108170656.GA5717@xxxxxxx>
On Tue, Jan 08, 2008 at 05:57:20PM +0100, Michael Andres wrote:
No, if an assertion fails it normally means data corruption. It
really makes no sense to return something in that case.
Even glibc aborts in that case.
Cheers,
Michael.
--
Michael Schroeder mls@xxxxxxx
SUSE LINUX Products GmbH, GF Markus Rex, HRB 16746 AG Nuernberg
main(_){while(_=~getchar())putchar(~_-1/(~(_|32)/13*2-11)*13);}
--
To unsubscribe, e-mail: zypp-devel+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: zypp-devel+help@xxxxxxxxxxxx
On Tue, Jan 08, Michael Schroeder wrote:
On Tue, Jan 08, 2008 at 05:06:17PM +0100, Klaus Kaempf wrote:
* Michael Schroeder <mls@xxxxxxx> [Jan 08. 2008 17:03]:
On Tue, Jan 08, 2008 at 05:00:15PM +0100, Klaus Kaempf wrote:
The current sat-solver implementation (solver.c) has almost
30 (thirty !) calls to abort().
Since C does not support exceptions, these calls should be replaced
by proper return values.
These are no exceptions, but assertions. It makes no sense to return
something.
Then please use assert().
Ok, will do.
IMO not acceptable for the solver lib to call abort (explicit or via
assert).
No, if an assertion fails it normally means data corruption. It
really makes no sense to return something in that case.
Even glibc aborts in that case.
Cheers,
Michael.
--
Michael Schroeder mls@xxxxxxx
SUSE LINUX Products GmbH, GF Markus Rex, HRB 16746 AG Nuernberg
main(_){while(_=~getchar())putchar(~_-1/(~(_|32)/13*2-11)*13);}
--
To unsubscribe, e-mail: zypp-devel+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: zypp-devel+help@xxxxxxxxxxxx
| < Previous | Next > |