View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0006185 | Taler | exchange | public | 2020-04-15 15:53 | 2020-04-16 21:50 |
Reporter | fefe | Assigned To | Christian Grothoff | ||
Priority | normal | Severity | minor | Reproducibility | have not tried |
Status | closed | Resolution | no change required | ||
Product Version | 0.7.0 | ||||
Target Version | 0.7.1 | Fixed in Version | 0.7.1 | ||
Summary | 0006185: confusing assertion before code handling the cases that trigger the assert | ||||
Description | This is in run_reserve_closures in exchange/src/exchange/taler-exchange-closer.c: 445 qs = db_plugin->get_expired_reserves (db_plugin->cls, 446 session, 447 now, 448 &expired_reserve_cb, 449 &erc); 450 GNUNET_assert (1 >= qs); 451 switch (qs) 452 { 453 case GNUNET_DB_STATUS_HARD_ERROR: 460 case GNUNET_DB_STATUS_SOFT_ERROR: 467 case GNUNET_DB_STATUS_SUCCESS_NO_RESULTS: 484 case GNUNET_DB_STATUS_SUCCESS_ONE_RESULT: These values are defined in gnunet_db_lib.h: 39 GNUNET_DB_STATUS_HARD_ERROR = -2, 45 GNUNET_DB_STATUS_SOFT_ERROR = -1, 53 GNUNET_DB_STATUS_SUCCESS_NO_RESULTS = 0, 58 GNUNET_DB_STATUS_SUCCESS_ONE_RESULT = 1 so the only case the assertion on line 450 lets through is GNUNET_DB_STATUS_SUCCESS_ONE_RESULT. | ||||
Tags | No tags attached. | ||||
|
I think you're reading the assertion wrong. 1 >= qs excludes qs values of 2, 3, 4, etc. qs > 1 is a valid result for SQL statements that had more than one result (and no LIMIT 1 clause). That's what the assertion checks against. |
|
fefe: all good on this one? |
|
Yes, sorry. That was a brain fart. :-) |
|
No problem, better a false-positive than a false-negative ;-). |
Date Modified | Username | Field | Change |
---|---|---|---|
2020-04-15 15:53 | fefe | New Issue | |
2020-04-15 15:53 | fefe | Status | new => assigned |
2020-04-15 15:53 | fefe | Assigned To | => Christian Grothoff |
2020-04-15 16:02 | Christian Grothoff | Note Added: 0015656 | |
2020-04-15 20:54 | Christian Grothoff | Status | assigned => feedback |
2020-04-16 21:45 | Christian Grothoff | Note Added: 0015668 | |
2020-04-16 21:48 | fefe | Note Added: 0015669 | |
2020-04-16 21:48 | fefe | Status | feedback => assigned |
2020-04-16 21:49 | Christian Grothoff | Note Added: 0015670 | |
2020-04-16 21:50 | Christian Grothoff | Status | assigned => resolved |
2020-04-16 21:50 | Christian Grothoff | Resolution | open => no change required |
2020-04-16 21:50 | Christian Grothoff | Fixed in Version | => 0.7.1 |
2020-04-16 21:50 | Christian Grothoff | Status | resolved => closed |
2020-04-16 21:50 | Christian Grothoff | Target Version | => 0.7.1 |