Commit 3b9b155
committed
Add human readable error message for invalid main signatures
Currently we have special handling if the entry point for analysis is called
`main`, in particular we assume it is one of the following:
int main(void)
int main(int argc, char *argv[])
int main(int argc, char *argv[], char *envp[])
If it is not so far we have been failing with an UNREACHABLE invariant failure.
Since it is completely possible to have a main signature like that, we should
fail with a proper human readable error message that tells people what is wrong
and maybe how they can work around it.1 parent 695a360 commit 3b9b155
File tree
3 files changed
+37
-1
lines changed- regression/cbmc/human-readable-error-on-wrong-main-signature
- src/ansi-c
3 files changed
+37
-1
lines changedLines changed: 12 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
Lines changed: 11 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
| |||
473 | 474 | | |
474 | 475 | | |
475 | 476 | | |
476 | | - | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
477 | 490 | | |
478 | 491 | | |
479 | 492 | | |
| |||
0 commit comments