Skip to content

Commit

Permalink
Merge branch 'hotfix-v3.0.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
Chase Geigle committed Aug 20, 2017
2 parents bfdb910 + cabb6bd commit c701940
Show file tree
Hide file tree
Showing 9 changed files with 65 additions and 11 deletions.
4 changes: 3 additions & 1 deletion .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,11 @@ install:
- set MSYSTEM=MINGW64
- bash -lc ""
- bash -lc "pacman --noconfirm --needed -Sy bash pacman pacman-mirrors msys2-runtime msys2-runtime-devel"
# kludge for error: "mingw-w64-x86_64-gcc: /mingw64/etc/gdbinit exists in filesystem"
- bash -lc "rm -f /mingw64/etc/gdbinit"
# we don't actually need ada, fortran, libgfortran, or objc, but in
# order to update gcc we need to also update those packages as well...
- bash -lc "pacman --noconfirm -S mingw-w64-x86_64-{gcc,gcc-ada,gcc-fortran,gcc-libgfortran,gcc-objc,cmake,make,icu,jemalloc,zlib}"
- bash -lc "pacman --noconfirm --needed -S mingw-w64-x86_64-{gcc,gcc-ada,gcc-fortran,gcc-libgfortran,gcc-objc,cmake,make,icu,jemalloc,zlib}"
before_build:
- set MSYSTEM=MINGW64
- cd C:\projects\meta
Expand Down
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ matrix:
osx_image: xcode8.2
env: COMPILER=clang

# OS X/GCC 6
# OS X/GCC 7
- os: osx
osx_image: xcode7.3
env: COMPILER=gcc
Expand Down
12 changes: 11 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
# [v3.0.2][3.0.2]
## Bug fixes
- Fix issues using `MAKE_NUMERIC_IDENTIFIER` instead of
`MAKE_NUMERIC_IDENTIFIER_UDL` on GCC 7.1.1.
- Work around (what we assume is) a bug on MSYS2 where `cmake` would link
in additional exception handling libraries that would cause a crash
during indexing by building the `mman-win32` library as shared.
- Silence fallthrough warnings on Clang from `murmur_hash`.

# [v3.0.1][3.0.1]
## New features
- Add an optional `xz{i,o}fstream` to `meta::io` if compiled with liblzma
Expand Down Expand Up @@ -628,7 +637,8 @@
# [v1.0][1.0]
- Initial release.

[unreleased]: https://github.com/meta-toolkit/meta/compare/v3.0.1...develop
[unreleased]: https://github.com/meta-toolkit/meta/compare/v3.0.2...develop
[3.0.2]: https://github.com/meta-toolkit/meta/compare/v3.0.1...v3.0.2
[3.0.1]: https://github.com/meta-toolkit/meta/compare/v3.0.0...v3.0.1
[3.0.0]: https://github.com/meta-toolkit/meta/compare/v2.4.2...v3.0.0
[2.4.2]: https://github.com/meta-toolkit/meta/compare/v2.4.1...v2.4.2
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ set(CMAKE_EXPORT_COMPILE_COMMANDS 1)

set(MeTA_VERSION_MAJOR 3)
set(MeTA_VERSION_MINOR 0)
set(MeTA_VERSION_PATCH 1)
set(MeTA_VERSION_PATCH 2)
set(MeTA_VERSION
"${MeTA_VERSION_MAJOR}.${MeTA_VERSION_MINOR}.${MeTA_VERSION_PATCH}")

Expand Down
16 changes: 16 additions & 0 deletions include/meta/hashing/hashes/murmur_hash.h
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,10 @@ class murmur_hash<4>
{
case 3:
k1 ^= static_cast<uint32_t>(buf_[2]) << 16;
// fallthrough
case 2:
k1 ^= static_cast<uint32_t>(buf_[1]) << 8;
// fallthrough
case 1:
k1 ^= buf_[0];
k1 *= c1;
Expand Down Expand Up @@ -248,37 +250,51 @@ class murmur_hash<8>
{
case 15:
k2 ^= static_cast<uint64_t>(buf_[14]) << 48;
// fallthrough
case 14:
k2 ^= static_cast<uint64_t>(buf_[13]) << 40;
// fallthrough
case 13:
k2 ^= static_cast<uint64_t>(buf_[12]) << 32;
// fallthrough
case 12:
k2 ^= static_cast<uint64_t>(buf_[11]) << 24;
// fallthrough
case 11:
k2 ^= static_cast<uint64_t>(buf_[10]) << 16;
// fallthrough
case 10:
k2 ^= static_cast<uint64_t>(buf_[9]) << 8;
// fallthrough
case 9:
k2 ^= static_cast<uint64_t>(buf_[8]);
k2 *= c2;
k2 = murmur::rotl(k2, 33);
k2 *= c1;
h2_ ^= k2;
// fallthrough

case 8:
k1 ^= static_cast<uint64_t>(buf_[7]) << 56;
// fallthrough
case 7:
k1 ^= static_cast<uint64_t>(buf_[6]) << 48;
// fallthrough
case 6:
k1 ^= static_cast<uint64_t>(buf_[5]) << 40;
// fallthrough
case 5:
k1 ^= static_cast<uint64_t>(buf_[4]) << 32;
// fallthrough
case 4:
k1 ^= static_cast<uint64_t>(buf_[3]) << 24;
// fallthrough
case 3:
k1 ^= static_cast<uint64_t>(buf_[2]) << 16;
// fallthrough
case 2:
k1 ^= static_cast<uint64_t>(buf_[1]) << 8;
// fallthrough
case 1:
k1 ^= static_cast<uint64_t>(buf_[0]);
k1 *= c1;
Expand Down
9 changes: 9 additions & 0 deletions include/meta/util/identifiers.h
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,15 @@ struct numerical_identifier : public identifier<Tag, T>, numeric
using identifier<Tag, T>::id_;
using identifier<Tag, T>::operator=;

// these shouldn't be needed, but GCC 7.1.1 is doing weird things when
// using MAKE_NUMERIC_IDENTIFIER instead of MAKE_NUMERIC_IDENTIFIER_UDL
// and explicitly defaulting these ctors/operators makes it go away...
numerical_identifier() = default;
numerical_identifier(const numerical_identifier&) = default;
numerical_identifier(numerical_identifier&&) = default;
numerical_identifier& operator=(const numerical_identifier&) = default;
numerical_identifier& operator=(numerical_identifier&&) = default;

/**
* Prefix-increment.
* @return the current identifier after being incremented
Expand Down
8 changes: 5 additions & 3 deletions src/io/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@ set(META_IO_SOURCES filesystem.cpp
gzstream.cpp
libsvm_parser.cpp
mmap_file.cpp)
if (WIN32)
list(APPEND META_IO_SOURCES mman-win32/mman.c)
endif()

if (META_HAS_LIBLZMA)
list(APPEND META_IO_SOURCES xzstream.cpp)
Expand All @@ -17,6 +14,11 @@ endif()
add_library(meta-io ${META_IO_SOURCES})
target_link_libraries(meta-io meta-util ${ZLIB_LIBRARIES})

if (WIN32)
add_subdirectory(mman-win32)
target_link_libraries(meta-io meta-mman-win32)
endif()

if (META_HAS_EXPERIMENTAL_FILESYSTEM)
target_link_libraries(meta-io ${STD_EXPERIMENTAL_FILESYSTEM_LIBRARIES})
else()
Expand Down
16 changes: 16 additions & 0 deletions src/io/mman-win32/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
project(meta-mman-win32)

# The below is currently marked as SHARED because as of cmake 3.9.1-1 of
# MSYS2, linking against a static library that has C code in it adds
# "-lgcc_eh -lgcc_eh" to the linker line, which causes difficult-to-debug
# (due to corrupted stack frames) segmentation faults when attempting to
# create indexes. Marking it as a shared library and linking against that
# does *not* add the "-lgcc_eh -lgcc_eh" to the linker line, and the issues
# disappear. Since these lines weren't added prior to cmake 3.9.1-1, there
# were no problems with the previous approach before then.
add_library(meta-mman-win32 SHARED mman.c)
target_link_libraries(meta-mman-win32 meta-definitions)

install(TARGETS meta-mman-win32
EXPORT meta-exports
DESTINATION lib)
7 changes: 3 additions & 4 deletions travis/install_osx.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,9 @@ else
fi

if [ "$COMPILER" == "gcc" ]; then
brew tap homebrew/versions
brew install homebrew/versions/gcc6
export CC=gcc-6
export CXX=g++-6
brew install gcc@7
export CC=gcc-7
export CXX=g++-7
fi

if [ "$COMPILER" == "clang" ]; then
Expand Down

0 comments on commit c701940

Please sign in to comment.