Skip to content

Commit

Permalink
Use HTML table for assert table since markdown doesn't render properly
Browse files Browse the repository at this point in the history
  • Loading branch information
paulidale committed Nov 6, 2023
1 parent 898afe1 commit 0ca537c
Showing 1 changed file with 26 additions and 5 deletions.
31 changes: 26 additions & 5 deletions policies/coding-style.md
Original file line number Diff line number Diff line change
Expand Up @@ -742,11 +742,32 @@ For example,

We have 3 kind of asserts. The behaviour depends on being a debug or release build:

| Function | failure release | failure debug | success release | success debug |
| -------------- | --------------- | ------------- | --------------- | ------------- |
| assert | not evaluated | abort | not evaluated | nothing |
| ossl_assert | returns 0 | abort | returns 1 | returns 1 |
| OPENSSL_assert | abort | abort | nothing | nothing |
<table>
<tr><th>Function</th>
<th>failure release</th>
<th>failure debug</th>
<th>success release</th>
<th>success debug</th>
</tr>
<tr><td>assert</td>
<td>not evaluated</td>
<td>abort</td>
<td>not evaluated</td>
<td>nothing</td>
</tr>
<tr><td>ossl_assert</td>
<td>returns 0</td>
<td>abort</td>
<td>returns 1</td>
<td>returns 1</td>
</tr>
<tr><td>OPENSSL_assert</td>
<td>abort</td>
<td>abort</td>
<td>nothing</td>
<td>nothing</td>
</tr>
</table>

Use OPENSSL_assert() **only** in the following cases:
- In the libraries when the global state of the software is corrupted and there is no way to recover it
Expand Down

0 comments on commit 0ca537c

Please sign in to comment.