-
Notifications
You must be signed in to change notification settings - Fork 262
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix Alpine's assert-statement conversion special case
In d44bfd3 we added a special case to catch Alpine Linux' assert structure. The match, however, was not sufficiently specific as it just accepted any statement that follows the actual assertion. Fixes: #8436
- Loading branch information
1 parent
dd54106
commit 4b5fae8
Showing
3 changed files
with
33 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
void __assert_fail(char *, char *, unsigned, char *); | ||
|
||
int main() | ||
{ | ||
(void)((1 < 2) || (__CPROVER_assert(0, ""), 0)); | ||
|
||
int jumpguard; | ||
jumpguard = (jumpguard | 1); | ||
label_1:; | ||
{ | ||
while(1) | ||
{ | ||
if(jumpguard == 0) | ||
{ | ||
__assert_fail("0", "lc2.c", 8U, "func"); | ||
goto label_1; | ||
} | ||
goto label_2; | ||
} | ||
label_2:; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
CORE test-c++-front-end | ||
main.c | ||
|
||
^EXIT=0$ | ||
^SIGNAL=0$ | ||
-- | ||
^warning: ignoring |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters