Skip to content

Commit 2036610

Browse files
committed
Merge branch 'release-1.3.1'
2 parents f377011 + 3914cb8 commit 2036610

File tree

16 files changed

+96
-23
lines changed

16 files changed

+96
-23
lines changed

Makefile.common.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Set the name of the project here
22
PROJECT_NAME := smack
3-
PROJ_VERSION := 1.3.0
3+
PROJ_VERSION := 1.3.1
44

55
# Set this variable to the top of the LLVM source tree.
66
LLVM_SRC_ROOT = @LLVM_SRC@

Makefile.llvm.config.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ PROJ_SRC_DIR := $(call realpath, $(PROJ_SRC_ROOT)/$(patsubst $(PROJ_OBJ_ROOT)%,%
5959
prefix := $(PROJ_INSTALL_ROOT)
6060
PROJ_prefix := $(prefix)
6161
ifndef PROJ_VERSION
62-
PROJ_VERSION := 1.3.0
62+
PROJ_VERSION := 1.3.1
6363
endif
6464

6565
PROJ_bindir := $(PROJ_prefix)/bin

bin/llvm2bpl.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
import io
88
import platform
99

10-
VERSION = '1.3.0'
10+
VERSION = '1.3.1'
1111

1212

1313
def is_valid_file(parser, arg):
@@ -75,6 +75,12 @@ def llvm2bpl(scriptPathName, infile, debugFlag, memmod):
7575
output = p.communicate()[1]
7676
bplStartIndex = output.find('// SMACK-PRELUDE-BEGIN')
7777
debug = output[0:bplStartIndex]
78+
if p.returncode != 0:
79+
if debugFlag:
80+
print debug
81+
print >> sys.stderr, "LLVM/SMACK encountered an error:"
82+
print >> sys.stderr, output[0:1000], "... (output truncated)"
83+
sys.exit("LLVM/SMACK returned exit status %s" % p.returncode)
7884
bpl = output[bplStartIndex:]
7985
return debug, bpl
8086

bin/smack-verify.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import platform
99
from smackgen import *
1010

11-
VERSION = '1.3.0'
11+
VERSION = '1.3.1'
1212

1313

1414
def generateSourceErrorTrace(boogieOutput, bpl):

bin/smackgen.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
import platform
88
from llvm2bpl import *
99

10-
VERSION = '1.3.0'
10+
VERSION = '1.3.1'
1111

1212

1313
def smackParser():

configure

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#! /bin/sh
22
# Guess values for system-dependent variables and create Makefiles.
3-
# Generated by GNU Autoconf 2.69 for SMACK 1.3.0.
3+
# Generated by GNU Autoconf 2.69 for SMACK 1.3.1.
44
#
55
# Report bugs to <smack-dev@googlegroups.com>.
66
#
@@ -580,8 +580,8 @@ MAKEFLAGS=
580580
# Identity of this package.
581581
PACKAGE_NAME='SMACK'
582582
PACKAGE_TARNAME='smack'
583-
PACKAGE_VERSION='1.3.0'
584-
PACKAGE_STRING='SMACK 1.3.0'
583+
PACKAGE_VERSION='1.3.1'
584+
PACKAGE_STRING='SMACK 1.3.1'
585585
PACKAGE_BUGREPORT='smack-dev@googlegroups.com'
586586
PACKAGE_URL='http://github.com/smackers/smack'
587587

@@ -1406,7 +1406,7 @@ if test "$ac_init_help" = "long"; then
14061406
# Omit some internal or obsolete options to make the list less imposing.
14071407
# This message is too long to be a string in the A/UX 3.1 sh.
14081408
cat <<_ACEOF
1409-
\`configure' configures SMACK 1.3.0 to adapt to many kinds of systems.
1409+
\`configure' configures SMACK 1.3.1 to adapt to many kinds of systems.
14101410
14111411
Usage: $0 [OPTION]... [VAR=VALUE]...
14121412
@@ -1472,7 +1472,7 @@ fi
14721472

14731473
if test -n "$ac_init_help"; then
14741474
case $ac_init_help in
1475-
short | recursive ) echo "Configuration of SMACK 1.3.0:";;
1475+
short | recursive ) echo "Configuration of SMACK 1.3.1:";;
14761476
esac
14771477
cat <<\_ACEOF
14781478
@@ -1621,7 +1621,7 @@ fi
16211621
test -n "$ac_init_help" && exit $ac_status
16221622
if $ac_init_version; then
16231623
cat <<\_ACEOF
1624-
SMACK configure 1.3.0
1624+
SMACK configure 1.3.1
16251625
generated by GNU Autoconf 2.69
16261626
16271627
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2170,7 +2170,7 @@ cat >config.log <<_ACEOF
21702170
This file contains any messages produced by compilers while
21712171
running configure, to aid debugging if configure makes a mistake.
21722172
2173-
It was created by SMACK $as_me 1.3.0, which was
2173+
It was created by SMACK $as_me 1.3.1, which was
21742174
generated by GNU Autoconf 2.69. Invocation command line was
21752175
21762176
$ $0 $@
@@ -13430,7 +13430,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
1343013430
# report actual input values of CONFIG_FILES etc. instead of their
1343113431
# values after options handling.
1343213432
ac_log="
13433-
This file was extended by SMACK $as_me 1.3.0, which was
13433+
This file was extended by SMACK $as_me 1.3.1, which was
1343413434
generated by GNU Autoconf 2.69. Invocation command line was
1343513435
1343613436
CONFIG_FILES = $CONFIG_FILES
@@ -13487,7 +13487,7 @@ _ACEOF
1348713487
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
1348813488
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
1348913489
ac_cs_version="\\
13490-
SMACK config.status 1.3.0
13490+
SMACK config.status 1.3.1
1349113491
configured by $0, generated by GNU Autoconf 2.69,
1349213492
with options \\"\$ac_cs_config\\"
1349313493

examples/failing/Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@ CC = clang
22
INC = ../../include/smack
33
CFLAGS = -c -Wall -emit-llvm -O0 -g -I$(INC)
44

5-
SOURCES = globals_func_ptr.c
5+
SOURCES = globals_func_ptr.c \
6+
struct_return.c
67

78
BITCODE = $(SOURCES:.c=.bc)
89

examples/failing/struct_return.c

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#include "smack.h"
2+
3+
struct a {
4+
long i;
5+
long j;
6+
};
7+
8+
struct a foo(struct a bar) {
9+
bar.i = 10;
10+
bar.j = 20;
11+
return bar;
12+
}
13+
14+
int main(void) {
15+
struct a x;
16+
x = foo(x);
17+
__SMACK_assert(x.j == 20);
18+
return 0;
19+
}
20+

include/smack/SmackRep.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ class SmackRep {
200200
const Expr* undef();
201201
const Expr* lit(const llvm::Value* v);
202202
const Expr* lit(unsigned v);
203-
const Expr* ptrArith(llvm::Value* p, vector<llvm::Value*> ps,
203+
const Expr* ptrArith(const llvm::Value* p, vector<llvm::Value*> ps,
204204
vector<llvm::Type*> ts);
205205
const Expr* expr(const llvm::Value* v);
206206
const Expr* op(llvm::BinaryOperator& o);

lib/AssistDS/DSNodeEquivs.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,12 @@ const DSNode *DSNodeEquivs::getMemberForValue(const Value *V) {
245245
std::deque<const User *> WL;
246246
SmallSet<const User *, 8> Visited;
247247

248-
WL.insert(WL.end(), V->use_begin(), V->use_end());
248+
// BEGIN BANDAGE: caught a bug here after upgrade to OSX Mavericks
249+
// ORIGINAL: WL.insert(WL.end(), V->use_begin(), V->use_end());
250+
for ( llvm::Value::const_use_iterator i = V->use_begin(); i != V->use_end(); ++i )
251+
WL.push_back(*i);
252+
// END BANDAGE
253+
249254
do {
250255
const User *TheUser = WL.front();
251256
WL.pop_front();

0 commit comments

Comments
 (0)