Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ $(APP_DIST_DIR)/Applications:
$(APP_DIST_EXTRAS): $(APP_DIST_DIR)/$(OSX_APP)/Contents/MacOS/DarkNet-Qt

$(OSX_DMG): $(APP_DIST_EXTRAS)
$(GENISOIMAGE) -no-cache-inodes -D -l -probe -V "$(OSX_VOLNAME)" -no-pad -r -dir-mode 0755 -apple -o $@ dist
$(GENISOIMAGE) -no-cache-inodes -D -l -probe -V "Darknet-Qt" -no-pad -r -dir-mode 0755 -apple -o $@ dist

$(APP_DIST_DIR)/.background/background.png:
$(MKDIR_P) $(@D)
Expand Down
11 changes: 0 additions & 11 deletions contrib/gitian-descriptors/gitian-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -157,17 +157,6 @@ script: |

CONFIG_SITE=${BASEPREFIX}/${i}/share/config.site ./configure --prefix=/ --disable-ccache --disable-maintainer-mode --disable-dependency-tracking ${CONFIGFLAGS} CFLAGS="${HOST_CFLAGS}" CXXFLAGS="${HOST_CXXFLAGS}" LDFLAGS="${HOST_LDFLAGS}"
make ${MAKEOPTS}
make ${MAKEOPTS} -C src check-security

#TODO: This is a quick hack that disables symbol checking for arm.
# Instead, we should investigate why these are popping up.
# For aarch64, we'll need to bump up the min GLIBC version, as the abi
# support wasn't introduced until 2.17.
case $i in
aarch64-*) : ;;
arm-*) : ;;
*) make ${MAKEOPTS} -C src check-symbols ;;
esac

make install DESTDIR=${INSTALLPATH}
cd installed
Expand Down
2 changes: 1 addition & 1 deletion contrib/gitian-descriptors/gitian-osx-signer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,5 @@ script: |
tar -xf ${UNSIGNED}
OSX_VOLNAME="$(cat osx_volname)"
./detached-sig-apply.sh ${UNSIGNED} signature/osx
${WRAP_DIR}/genisoimage -no-cache-inodes -D -l -probe -V "${OSX_VOLNAME}" -no-pad -r -dir-mode 0755 -apple -o uncompressed.dmg signed-app
${WRAP_DIR}/genisoimage -no-cache-inodes -D -l -probe -V "Darknet-Qt" -no-pad -r -dir-mode 0755 -apple -o uncompressed.dmg signed-app
${WRAP_DIR}/dmg dmg uncompressed.dmg ${OUTDIR}/${SIGNED}
25 changes: 24 additions & 1 deletion contrib/gitian-descriptors/gitian-win.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,30 @@ script: |
done
}

function create_per-host_linker_wrapper {
# This is only needed for trusty, as the mingw linker leaks a few bytes of
# heap, causing non-determinism. See discussion in https://github.com/bitcoin/bitcoin/pull/6900
for i in $HOSTS; do
mkdir -p ${WRAP_DIR}/${i}
for prog in collect2; do
echo '#!/bin/bash' > ${WRAP_DIR}/${i}/${prog}
REAL=$(${i}-gcc -print-prog-name=${prog})
echo "export MALLOC_PERTURB_=255" >> ${WRAP_DIR}/${i}/${prog}
echo "${REAL} \$@" >> $WRAP_DIR/${i}/${prog}
chmod +x ${WRAP_DIR}/${i}/${prog}
done
for prog in gcc g++; do
echo '#!/bin/bash' > ${WRAP_DIR}/${i}-${prog}
echo "REAL=\`which -a ${i}-${prog} | grep -v ${WRAP_DIR}/${i}-${prog} | head -1\`" >> ${WRAP_DIR}/${i}-${prog}
echo 'export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/faketime/libfaketime.so.1' >> ${WRAP_DIR}/${i}-${prog}
echo "export FAKETIME=\"$1\"" >> ${WRAP_DIR}/${i}-${prog}
echo "export COMPILER_PATH=${WRAP_DIR}/${i}" >> ${WRAP_DIR}/${i}-${prog}
echo "\$REAL \$@" >> $WRAP_DIR/${i}-${prog}
chmod +x ${WRAP_DIR}/${i}-${prog}
done
done
}

# Faketime for depends so intermediate results are comparable
export PATH_orig=${PATH}
create_global_faketime_wrappers "2000-01-01 12:00:00"
Expand Down Expand Up @@ -119,7 +143,6 @@ script: |

CONFIG_SITE=${BASEPREFIX}/${i}/share/config.site ./configure --prefix=/ --disable-ccache --disable-maintainer-mode --disable-dependency-tracking ${CONFIGFLAGS} CFLAGS="${HOST_CFLAGS}" CXXFLAGS="${HOST_CXXFLAGS}"
make ${MAKEOPTS}
make ${MAKEOPTS} -C src check-security
make deploy
make install DESTDIR=${INSTALLPATH}
cp -f darknet-*setup*.exe $OUTDIR/
Expand Down
3 changes: 3 additions & 0 deletions src/Makefile.qt.include
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,8 @@ RES_ICONS = \
qt/res/icons/receive.png \
qt/res/icons/remove.png \
qt/res/icons/send.png \
qt/res/icons/staking_active.png \
qt/res/icons/staking_inactive.png \
qt/res/icons/synced.png \
qt/res/icons/trade.png \
qt/res/icons/transaction0.png \
Expand All @@ -240,6 +242,7 @@ BITCOIN_QT_CPP = \
qt/csvmodelwriter.cpp \
qt/guiutil.cpp \
qt/intro.cpp \
qt/masternodelist.cpp \
qt/networkstyle.cpp \
qt/notificator.cpp \
qt/optionsdialog.cpp \
Expand Down
4 changes: 2 additions & 2 deletions src/compat/glibc_sanity.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2009-2014 The Bitcoin developers
// Copyright (c) 2009-2014 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

Expand Down Expand Up @@ -65,4 +65,4 @@ bool glibc_sanity_test()
return false;
#endif
return sanity_test_memcpy<1025>();
}
}
117 changes: 42 additions & 75 deletions src/compat/glibcxx_compat.cpp
Original file line number Diff line number Diff line change
@@ -1,94 +1,61 @@
// Copyright (c) 2009-2014 The Bitcoin developers
// Copyright (c) 2009-2014 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

#include <cstddef>
#include <istream>
#include <list>
#include <locale>
#include <stdexcept>
#include <typeinfo>

#ifndef _GLIBCXX_USE_NOEXCEPT
#define _GLIBCXX_USE_NOEXCEPT throw()
#endif

namespace std
{
const char* bad_exception::what() const throw()
namespace
{
return "std::bad_exception";
}

const char* bad_cast::what() const throw()
// trigger: use ctype<char>::widen to trigger ctype<char>::_M_widen_init().
// test: convert a char from narrow to wide and back. Verify that the result
// matches the original.
bool sanity_test_widen(char testchar)
{
return "std::bad_cast";
const std::ctype<char>& test(std::use_facet<std::ctype<char> >(std::locale()));
return test.narrow(test.widen(testchar), 'b') == testchar;
}

const char* bad_alloc::what() const throw()
// trigger: use list::push_back and list::pop_back to trigger _M_hook and
// _M_unhook.
// test: Push a sequence of integers into a list. Pop them off and verify that
// they match the original sequence.
bool sanity_test_list(unsigned int size)
{
return "std::bad_alloc";
}
std::list<unsigned int> test;
for (unsigned int i = 0; i != size; ++i)
test.push_back(i + 1);

namespace __detail
{
struct _List_node_base {
void _M_hook(std::__detail::_List_node_base* const __position) throw() __attribute__((used))
{
_M_next = __position;
_M_prev = __position->_M_prev;
__position->_M_prev->_M_next = this;
__position->_M_prev = this;
}
if (test.size() != size)
return false;

void _M_unhook() __attribute__((used))
{
_List_node_base* const __next_node = _M_next;
_List_node_base* const __prev_node = _M_prev;
__prev_node->_M_next = __next_node;
__next_node->_M_prev = __prev_node;
while (!test.empty()) {
if (test.back() != test.size())
return false;
test.pop_back();
}
return true;
}

_List_node_base* _M_next;
_List_node_base* _M_prev;
};
} // namespace detail

template ostream& ostream::_M_insert(bool);
template ostream& ostream::_M_insert(long);
template ostream& ostream::_M_insert(double);
template ostream& ostream::_M_insert(unsigned long);
template ostream& ostream::_M_insert(const void*);
template ostream& __ostream_insert(ostream&, const char*, streamsize);
template istream& istream::_M_extract(long&);
template istream& istream::_M_extract(unsigned short&);

out_of_range::~out_of_range() _GLIBCXX_USE_NOEXCEPT {}

length_error::~length_error() _GLIBCXX_USE_NOEXCEPT {}

// Used with permission.
// See: https://github.com/madlib/madlib/commit/c3db418c0d34d6813608f2137fef1012ce03043d
} // anon namespace

void ctype<char>::_M_widen_init() const
// trigger: string::at(x) on an empty string to trigger __throw_out_of_range_fmt.
// test: force std::string to throw an out_of_range exception. Verify that
// it's caught correctly.
bool sanity_test_range_fmt()
{
char __tmp[sizeof(_M_widen)];
for (unsigned __i = 0; __i < sizeof(_M_widen); ++__i)
__tmp[__i] = __i;
do_widen(__tmp, __tmp + sizeof(__tmp), _M_widen);

_M_widen_ok = 1;
// Set _M_widen_ok to 2 if memcpy can't be used.
for (unsigned __i = 0; __i < sizeof(_M_widen); ++__i)
if (__tmp[__i] != _M_widen[__i]) {
_M_widen_ok = 2;
break;
}
std::string test;
try {
test.at(1);
} catch (const std::out_of_range&) {
return true;
} catch (...) {
}
return false;
}

void __throw_out_of_range_fmt(const char*, ...) __attribute__((__noreturn__));
void __throw_out_of_range_fmt(const char* err, ...)
bool glibcxx_sanity_test()
{
// Safe and over-simplified version. Ignore the format and print it as-is.
__throw_out_of_range(err);
}

} // namespace std
return sanity_test_widen('a') && sanity_test_list(100) && sanity_test_range_fmt();
}
2 changes: 1 addition & 1 deletion src/qt/darknet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -548,8 +548,8 @@ int main(int argc, char *argv[])
QTextCodec::setCodecForCStrings(QTextCodec::codecForTr());
#endif

Q_INIT_RESOURCE(darknet);
Q_INIT_RESOURCE(darknet_locale);
Q_INIT_RESOURCE(darknet);

BitcoinApplication app(argc, argv);
#if QT_VERSION > 0x050100
Expand Down
2 changes: 1 addition & 1 deletion src/qt/guiutil.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -823,7 +823,7 @@ QString loadStyleSheet()
// External CSS
settings.setValue("fCSSexternal", true);
boost::filesystem::path pathAddr = GetDataDir() / "themes/";
cssName = pathAddr.c_str() + theme + "/css/theme.css";
cssName = pathAddr.string().c_str() + theme + "/css/theme.css";
}
else{
// Build-in CSS
Expand Down
2 changes: 1 addition & 1 deletion src/qt/optionsdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ OptionsDialog::OptionsDialog(QWidget *parent, bool enableWallet) :

/* Theme selector external themes */
boost::filesystem::path pathAddr = GetDataDir() / "themes";
QDir dir(pathAddr.c_str());
QDir dir(pathAddr.string().c_str());
dir.setFilter(QDir::Dirs | QDir::NoSymLinks | QDir::NoDotAndDotDot);
QFileInfoList list = dir.entryInfoList();

Expand Down