File tree Expand file tree Collapse file tree 3 files changed +10
-3
lines changed
regression/cbmc/assigning_nullpointers_should_not_crash_symex Expand file tree Collapse file tree 3 files changed +10
-3
lines changed Original file line number Diff line number Diff line change 1
1
#include <assert.h>
2
- #include <stddef .h>
2
+ #include <stdlib .h>
3
3
4
4
struct linked_list
5
5
{
Original file line number Diff line number Diff line change 1
- KNOWNBUG
1
+ CORE broken-smt-backend
2
2
main.c
3
3
4
4
^EXIT=0$
Original file line number Diff line number Diff line change @@ -1760,7 +1760,7 @@ optionalt<std::string> simplify_exprt::expr2bits(
1760
1760
if (
1761
1761
type.id () == ID_unsignedbv || type.id () == ID_signedbv ||
1762
1762
type.id () == ID_floatbv || type.id () == ID_fixedbv ||
1763
- type.id () == ID_c_bit_field || type. id () == ID_pointer )
1763
+ type.id () == ID_c_bit_field)
1764
1764
{
1765
1765
const auto width = to_bitvector_type (type).get_width ();
1766
1766
@@ -1773,6 +1773,13 @@ optionalt<std::string> simplify_exprt::expr2bits(
1773
1773
1774
1774
return result;
1775
1775
}
1776
+ else if (type.id () == ID_pointer)
1777
+ {
1778
+ if (value == ID_NULL && config.ansi_c .NULL_is_zero )
1779
+ return std::string (' 0' , to_bitvector_type (type).get_width ());
1780
+ else
1781
+ return {};
1782
+ }
1776
1783
else if (type.id () == ID_c_enum_tag)
1777
1784
{
1778
1785
const auto &c_enum_type = ns.follow_tag (to_c_enum_tag_type (type));
You can’t perform that action at this time.
0 commit comments