Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compiler bug about libjpeg. #110

Closed
flyingforyou opened this issue Jun 1, 2016 · 13 comments
Closed

Compiler bug about libjpeg. #110

flyingforyou opened this issue Jun 1, 2016 · 13 comments
Labels

Comments

@flyingforyou
Copy link

Test Env: Nexus 6P(angler).
Source : 2016-06-01 AOSP Master Branch.

Modification: external/jpeg/Android.mk

diff --git a/Android.mk b/Android.mk
index 8f838f9..db9f5c3 100644
--- a/Android.mk
+++ b/Android.mk
@@ -21,7 +21,7 @@ LOCAL_SDK_VERSION := 17
endif

LOCAL_CFLAGS += -DAVOID_TABLES
-LOCAL_CFLAGS += -O3 -fstrict-aliasing -fprefetch-loop-arrays
+LOCAL_CFLAGS += -O3 -fstrict-aliasing -fprefetch-loop-arrays -mcpu=cortex-a57
LOCAL_CFLAGS += -Wno-unused-parameter
#LOCAL_CFLAGS += -march=armv6j

Test:

  1. building full AOSP source,
  2. push any jpeg to /sdcard/DCIM
  3. reboot the device.
  4. execute Gallary

Result:
You can see the below result.

07-30 05:52:37.641: A/DEBUG(2192): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
07-30 05:52:37.641: A/DEBUG(2192): Build fingerprint: 'Android/aosp_angler/angler:6.0.1/MASTER/flying05312005:eng/test-keys'
07-30 05:52:37.641: A/DEBUG(2192): Revision: '0'
07-30 05:52:37.641: A/DEBUG(2192): ABI: 'arm64'
07-30 05:52:37.642: A/DEBUG(2192): pid: 2163, tid: 2189, name: thread-pool-1 >>> com.android.gallery3d <<<
07-30 05:52:37.642: A/DEBUG(2192): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0xfbf69a20f00
07-30 05:52:37.642: A/DEBUG(2192): x0 0000000000000404 x1 0000007f69a20828 x2 000001e800000001 x3 0000007f6e3eb030
07-30 05:52:37.642: E/DisplayEventDispatcher(1549): dispatcher 0x7f7d3d24c0 ~ Vsync pulse: timestamp=109285, id=0, count=943
07-30 05:52:37.642: A/DEBUG(2192): x4 0000000000000001 x5 0000007f69a20ef8 x6 0000007f69a20818 x7 8080808080808080
07-30 05:52:37.642: A/DEBUG(2192): x8 0000007f89a5c694 x9 0000000000000000 x10 0000000000000001 x11 8080808080808080
07-30 05:52:37.642: A/DEBUG(2192): x12 8080808080808080 x13 8080808080808080 x14 8080808080808080 x15 0000007f89a38480
07-30 05:52:37.642: A/DEBUG(2192): x16 00000f4000000008 x17 0000007f89a48a70 x18 0000000000000081 x19 0000007f69a20ed4
07-30 05:52:37.642: A/DEBUG(2192): x20 0000007f6e3eb6d8 x21 0000007f6e3eafa4 x22 0000007f6e3eb6d8 x23 0000000000000001
07-30 05:52:37.642: A/DEBUG(2192): x24 0000007f69a20e80 x25 0000007f69a20e70 x26 0000000000000001 x27 0000007f69a20718
07-30 05:52:37.642: A/DEBUG(2192): x28 0000000000000000 x29 0000007f6e3eaf40 x30 0000007f89a556a8
07-30 05:52:37.642: A/DEBUG(2192): sp 0000007f6e3eaee0 pc 0000007f89a384f4 pstate 0000000060000000
07-30 05:52:37.659: E/DisplayEventDispatcher(1549): dispatcher 0x7f7d3d24c0 ~ Vsync pulse: timestamp=109302, id=0, count=944
07-30 05:52:37.675: E/DisplayEventDispatcher(1549): dispatcher 0x7f7d3d24c0 ~ Vsync pulse: timestamp=109319, id=0, count=945
07-30 05:52:37.692: E/DisplayEventDispatcher(1549): dispatcher 0x7f7d3d24c0 ~ Vsync pulse: timestamp=109335, id=0, count=946
07-30 05:52:37.697: A/DEBUG(2192): backtrace:
07-30 05:52:37.697: A/DEBUG(2192): #00 pc 00000000000054f4 /system/lib64/libjpeg.so
07-30 05:52:37.697: A/DEBUG(2192): #1 pc 00000000000226a4 /system/lib64/libjpeg.so (sep_upsample+256)
07-30 05:52:37.697: A/DEBUG(2192): #2 pc 000000000001cb00 /system/lib64/libjpeg.so (process_data_simple_main+136)
07-30 05:52:37.697: A/DEBUG(2192): #3 pc 0000000000015b08 /system/lib64/libjpeg.so (jpeg_read_scanlines+152)
07-30 05:52:37.698: A/DEBUG(2192): #4 pc 0000000000259cb0 /system/lib64/libskia.so (SkJPEGImageDecoder::onDecode(SkStream_, SkBitmap_, SkImageDecoder::Mode)+1036)
07-30 05:52:37.698: A/DEBUG(2192): #5 pc 0000000000255eac /system/lib64/libskia.so (SkImageDecoder::decode(SkStream_, SkBitmap_, SkColorType, SkImageDecoder::Mode)+96)
07-30 05:52:37.698: A/DEBUG(2192): #6 pc 00000000000f287c /system/lib64/libandroid_runtime.so (doDecode(JNIEnv, SkStreamRewindable_, jobject, jobject)+1280)
07-30 05:52:37.698: A/DEBUG(2192): #7 pc 00000000000f3a90 /system/lib64/libandroid_runtime.so (nativeDecodeFileDescriptor(JNIEnv, jobject, jobject, jobject, jobject)+200)
07-30 05:52:37.698: A/DEBUG(2192): #8 pc 00000000000dae10 /system/lib64/libart.so (art_quick_generic_jni_trampoline+144)
07-30 05:52:37.698: A/DEBUG(2192): #9 pc 00000000000d1ae8 /system/lib64/libart.so (art_quick_invoke_static_stub+600)
07-30 05:52:37.698: A/DEBUG(2192): #10 pc 00000000000de474 /system/lib64/libart.so (art::ArtMethod::Invoke(art::Thread_, unsigned int_, unsigned int, art::JValue_, char const_)+256)
07-30 05:52:37.698: A/DEBUG(2192): #11 pc 000000000028cf78 /system/lib64/libart.so (art::interpreter::ArtInterpreterToCompiledCodeBridge(art::Thread_, art::ArtMethod_, art::DexFile::CodeItem const_, art::ShadowFrame_, art::JValue_)+312)
07-30 05:52:37.698: A/DEBUG(2192): #12 pc 0000000000285f64 /system/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod_, art::Thread_, art::ShadowFrame&, art::Instruction const_, unsigned short, art::JValue_)+596)
07-30 05:52:37.698: A/DEBUG(2192): #13 pc 000000000055586c /system/lib64/libart.so (MterpInvokeStatic+356)
07-30 05:52:37.698: A/DEBUG(2192): #14 pc 00000000000c4394 /system/lib64/libart.so (ExecuteMterpImpl+14612)

I don't think that this bug can be fixed when we update next prebuilt compiler which will be based on r264688. I tried to build with recent version of prebuilt compiler, I also saw same issue.

@DanAlbert, @stephenhines .
How do you think about this problem?, When I debugged this problem shortly, it's very complicated to find what's the main problem is. (Maybe related with Function Inlining, IPO, RA ...)

@DanAlbert
Copy link
Member

In my experience anything with -O3 in its Android.mk is generally the one at fault because UB is out to get everyone. I assume the problem goes away if you switch it to -O2?

@stephenhines
Copy link
Collaborator

I also see the ever-popular source of non-compiler bugs in -fstrict-aliasing. Subtle mistakes in aliasing will actually cause similar problems, as compilers get better at optimizing any lurking bugs into extremely visible problems.

@flyingforyou
Copy link
Author

Thanks for the comments.

@DanAlbert,
I also tested with -O2 option. And it showed same error. But when I tried to use -O0 option, there is no error.

@stephenhines,
I also saw same problem in libjpeg-turbo. Could you report this issue your team member who is responsible for libjpeg?

@flyingforyou
Copy link
Author

Anyway, this problem only occurs when we use -mcpu=cortex-a57.

@sebpop
Copy link

sebpop commented Jun 28, 2016

Hi Junmo,
I am able to reproduce the error on an arm64 Juno device even without the extra -mcpu=cortex-a57
at -O2 and above, and also without -fstrict-aliasing. It passes at -O0 and -O1.

As a reduced test I found in the makefiles of libjpeg:
./djpeg -dct int -ppm -outfile testout.ppm testorig.jpg
that segfaults when executed on a device.
I also had to link jsimd_neon.c and jsimd_arm64_neon.S.

Compiling only jdsample.c at -O1 fixes the problem:
CFLAGS="-O1 -DAVOID_TABLES -Wno-unused-parameter -DANDROID_TILE_BASED_DECODE"
$CC $CFLAGS -c -o jdsample.o jdsample.c

Out of which if I outline only sep_upsample() and compile it separately, it gets miscompiled.

git bisect points to http://reviews.llvm.org/rL273755 as the first patch starting to miscompile jdsample.c.
Using "clang -O3 jdsample.c -emit-llvm -o f.bc" followed by "llc -O1 f.bc; clang -o jdsample.o f.s; linkall..." makes it work, and "llc -O2" shows the miscompile.

https://llvm.org/bugs/show_bug.cgi?id=28393

Sebastian

@flyingforyou
Copy link
Author

Great Sebastian. And thanks for finding problem.
Did you compile libjpeg with Google's LLVM git or ToT of LLVM?

I will test "-mllvm -enable-pre=false" option when building Android and will update result.

@sebpop
Copy link

sebpop commented Jun 28, 2016

That was with LLVM ToT as of yesterday.

kneth added a commit to realm/realm-core that referenced this issue Jun 29, 2016
…by other

projects that -O3 might produce wrong code (android/ndk#110).
kneth pushed a commit to realm/realm-core that referenced this issue Jun 30, 2016
…by other (#1930)

projects that -O3 might produce wrong code (android/ndk#110).
@DanAlbert DanAlbert added the clang label Jul 7, 2016
@sebpop
Copy link

sebpop commented Jul 7, 2016

From these two comments,
https://llvm.org/bugs/show_bug.cgi?id=28393#c19
https://llvm.org/bugs/show_bug.cgi?id=28393#c22
the fix is:

diff --git a/jsimd_arm64_neon.S b/jsimd_arm64_neon.S
index 099d4b5..70cf231 100644
--- a/jsimd_arm64_neon.S
+++ b/jsimd_arm64_neon.S
@@ -1711,7 +1711,7 @@ Ljsimd_ycc_\colorid\()_neon_consts:
 asm_function jsimd_ycc_\colorid\()_convert_neon
     OUTPUT_WIDTH    .req x0
     INPUT_BUF       .req x1
-    INPUT_ROW       .req x2
+    INPUT_ROW       .req w2
     OUTPUT_BUF      .req x3
     NUM_ROWS        .req x4

@sebpop
Copy link

sebpop commented Jul 8, 2016

Please review and add the right reviewers for the following patch:
https://android-review.googlesource.com/246437

@flyingforyou
Copy link
Author

Thanks Sebastian.
I confirmed that above patch can fix the problem.

sebpop pushed a commit to sebpop/libjpeg-turbo that referenced this issue Jul 11, 2016
This patch fixes android/ndk#110
The crash seemed to come from a change in LLVM and was reported to the LLVM
bugzilla https://llvm.org/bugs/show_bug.cgi?id=28393

Upon investigation, LLVM optimized away the zeroing of the upper bits of the x2
register before calling color_convert.  The convention is for the callee to do
any truncation needed.  The patch tries to use the Wn registers whenever
possible, and otherwise use a zero-extend instruction to avoid using the
random information in the upper 32 bits of the 64 bit registers.
sebpop pushed a commit to sebpop/libjpeg-turbo that referenced this issue Jul 12, 2016
This patch fixes android/ndk#110
The crash seemed to come from a change in LLVM and was reported to the LLVM
bugzilla https://llvm.org/bugs/show_bug.cgi?id=28393

Upon investigation, LLVM optimized away the zeroing of the upper bits of the x2
register before calling color_convert.  The convention is for the callee to do
any truncation needed.  The patch tries to use the Wn registers whenever
possible, and otherwise use a zero-extend instruction to avoid using the
random information in the upper 32 bits of the 64 bit registers.
sebpop pushed a commit to sebpop/libjpeg-turbo that referenced this issue Jul 12, 2016
This patch fixes android/ndk#110
The crash seemed to come from a change in LLVM and was reported to the LLVM
bugzilla https://llvm.org/bugs/show_bug.cgi?id=28393

Upon investigation, LLVM optimized away the zeroing of the upper bits of the x2
register before calling color_convert.  The convention is for the callee to do
any truncation needed.  The patch tries to use the Wn registers whenever
possible, and otherwise use a zero-extend instruction to avoid using the
random information in the upper 32 bits of the 64 bit registers.
dcommander added a commit to libjpeg-turbo/libjpeg-turbo that referenced this issue Jul 13, 2016
In the AArch64 ABI, the high (unused) DWORD of a 32-bit argument's
register is undefined, so it was incorrect to use 64-bit
instructions to transfer a JDIMENSION argument in the 64-bit NEON SIMD
functions.  The code worked thus far only because the existing compiler
optimizers weren't smart enough to do anything else with the register in
question, so the upper 32 bits happened to be all zeroes.

The latest builds of Clang/LLVM have a smarter optimizer, and under
certain circumstances, it will attempt to load-combine adjacent 32-bit
integers from one of the libjpeg structures into a single 64-bit integer
and pass that 64-bit integer as a 32-bit argument to one of the SIMD
functions (which is allowed by the ABI, since the upper 32 bits of the
32-bit argument's register are undefined.)  This caused the
libjpeg-turbo regression tests to crash.

This patch tries to use the Wn registers whenever possible.  Otherwise,
it uses a zero-extend instruction to avoid using the upper 32 bits of
the 64-bit registers, which are not guaranteed to be valid for 32-bit
arguments.

Based on sebpop@1fbae13

Closes #91.  Refer also to android/ndk#110 and
https://llvm.org/bugs/show_bug.cgi?id=28393
@sebpop
Copy link

sebpop commented Jul 13, 2016

Fixed upstream in libjpeg-turbo/libjpeg-turbo@1120ff2

Please pull the patch from libjpeg-turbo.

@DanAlbert
Copy link
Member

DanAlbert commented Jul 13, 2016

I'll file a bug against the people maintaining that, but I'm closing this since it isn't an NDK issue.

@flyingforyou
Copy link
Author

Great! I am very glad to solve this problem together.
Thanks Dan, Steve, Sebastian.

BoredOutOfMyGit pushed a commit to codeaurora-unofficial/platform-external-jpeg that referenced this issue Jul 17, 2016
In the AArch64 ABI, the high (unused) DWORD of a 32-bit argument's
register is undefined, so it was incorrect to use 64-bit instructions
to transfer a JDIMENSION argument in the 64-bit NEON SIMD functions.
The code worked thus far only because the existing compiler optimizers
weren't smart enough to do anything else with the register in question,
so the upper 32 bits happened to be all zeroes.

The latest builds of Clang/LLVM have a smarter optimizer, and under
certain circumstances, it will attempt to load-combine adjacent 32-bit
integers from one of the libjpeg structures into a single 64-bit integer
and pass that 64-bit integer as a 32-bit argument to one of the SIMD
functions (which is allowed by the ABI, since the upper 32 bits of the
32-bit argument's register are undefined.)  This caused the
libjpeg-turbo regression tests to crash.

This patch tries to use the Wn registers whenever possible.  Otherwise,
it uses a zero-extend instruction to avoid using the upper 32 bits of
the 64-bit registers, which are not guaranteed to be valid for 32-bit
arguments.

Based on sebpop@1fbae13

Closes #91.  Refer also to android/ndk#110 and
https://llvm.org/bugs/show_bug.cgi?id=28393

(cherrypick from external/libjpeg-turbo of c8282be605a139b269f2b8f4b4fb6f4118e740ab.)

Change-Id: I935a3696106e7ffcf9b1a6c12cb7f31d95b4ccc8
rrrlasse pushed a commit to realm/realm-core that referenced this issue Aug 23, 2016
commit 6c6e76b97146a5f6f5a24ea3bfea7575f2c44ea8
Merge: 292464c 1a21dfe
Author: Lasse Reinhold <[email protected]>
Date:   Mon Aug 22 17:35:21 2016 +0200

    Merge pull request #2044 from realm/lr/dumper

    Made schema_dumper.cpp work in VS

commit 292464c4a969c830536bb8672ba146f743ad5b57
Merge: 607e084 9791064
Author: Jørgen Edelbo <[email protected]>
Date:   Mon Aug 22 13:00:08 2016 +0200

    Merge pull request #2047 from realm/jed/remove-default-destructor-definition

    Remove definition of TableView destructor

commit 607e084ddc3fa91c36a95e2b04bc99aac916fe88
Merge: 2332200 377ab83
Author: James Stone <[email protected]>
Date:   Fri Aug 19 15:21:07 2016 +0200

    Merge pull request #2055 from realm/js/xcode-warning

    Silence implicit cast warning from xcode.

commit 2332200182a69b096164587b7c0d235a18b65fe9
Merge: 4ee2c59 5c5ac61
Author: Kristian Spangsege <[email protected]>
Date:   Fri Aug 19 13:54:11 2016 +0200

    Merge pull request #2037 from realm/ks/allow-setting-thread-names

    Support for setting thread names (util::Thread::set_name())

commit 377ab836595b489d1835920d100f160889a1f8a5
Author: James Stone <[email protected]>
Date:   Fri Aug 19 13:51:15 2016 +0200

    Silence implicit cast warning in xcode.

commit 5c5ac614f0c0a2d716cfc352b0035fa89e453d73
Author: Kristian Spangsege <[email protected]>
Date:   Thu Aug 18 19:25:09 2016 +0200

    Eliminate any risk of buffer overrun in Thread::get_name()

commit 63219cdc6625f6b18b37cb88d133433774e96a0b
Merge: cd43323 4ee2c59
Author: Kristian Spangsege <[email protected]>
Date:   Thu Aug 18 19:17:49 2016 +0200

    Merge branch 'master' into ks/allow-setting-thread-names

commit 4ee2c5905394e3ba7331c92f1e7b69d741029689
Author: Emanuele Zattin <[email protected]>
Date:   Thu Aug 18 14:39:01 2016 +0200

    Updated release notes

commit 124a98cc80e577da0cbd0d5d345d3e5feae02eff
Merge: c2e18fd 73316fb
Author: James Stone <[email protected]>
Date:   Thu Aug 18 13:24:29 2016 +0200

    Merge pull request #2048 from realm/js/rc-1.5.1

    Release Candidate 1.5.1

commit 73316fbd2508ede20855606fd59c5bd24c7ae48e
Author: James Stone <[email protected]>
Date:   Thu Aug 18 10:13:40 2016 +0200

    Update release notes.

commit 32625b0ce862d2bebbfb8bb3dcf90046f51166a1
Author: James Stone <[email protected]>
Date:   Thu Aug 18 10:12:19 2016 +0200

    Bump version to 1.5.1.

commit c2e18fd13aad5d40d322977e024db331a252220f
Merge: 37d0d12 4c46e05
Author: Finn Schiermer Andersen <[email protected]>
Date:   Wed Aug 17 18:55:15 2016 +0200

    Merge pull request #2035 from realm/fsa/threadsafe_descriptor_destruction

    Threadsafe descriptor destruction

commit 4c46e054ca436aaee497e12dc7baa505c00cce40
Merge: dfc688b 37d0d12
Author: Finn Schiermer Andersen <[email protected]>
Date:   Wed Aug 17 16:50:18 2016 +0200

    Merge branch 'master' of https://github.com/realm/realm-core into fsa/threadsafe_descriptor_destruction

commit dfc688b938efd025e8eda8dbd28a37ebacab525b
Merge: 2250ad9 3351cce
Author: Finn Schiermer Andersen <[email protected]>
Date:   Wed Aug 17 16:34:13 2016 +0200

    Merge branch 'fsa/threadsafe_descriptor_destruction' of https://github.com/realm/realm-core into fsa/threadsafe_descriptor_destruction

commit 2250ad970f896b1b55e592c56370ee0a56b70196
Author: Finn Schiermer Andersen <[email protected]>
Date:   Wed Aug 17 16:33:21 2016 +0200

    fix: don't use clear_root_table_desc to unregister when the descriptor dies

commit 97910647b8fc80a3ba63977f76a3744ebc29c2d1
Author: Jørgen Edelbo <[email protected]>
Date:   Fri Aug 12 14:54:16 2016 +0200

    Remove definition of TableView destructor

    Having the destructor defined, prevents the generation of at least the
    move constructor and move assignment operator. This is not a problem
    in released code, as the need for those functions are most probably
    optimized out. In debug mode, however, we have a fundamentally different
    behavior, where the copy constructors are used where we would expect move
    constructor. Also the comments hints that the class is moveable.

commit 37d0d12cfbdec3552f3e87762615da239e1dbaae
Merge: 91acdae b14738a
Author: Jørgen Edelbo <[email protected]>
Date:   Wed Aug 17 16:11:20 2016 +0200

    Merge pull request #1998 from realm/jed/improve-test-coverage

    Improve test coverage

commit 91acdaed0c37bd08a63c8d15ebbbd2619199c1fe
Merge: 9524e3e 4df541c
Author: Thomas Goyne <[email protected]>
Date:   Wed Aug 17 06:56:14 2016 -0700

    Merge pull request #2041 from realm/tg/backlink

    Support column insertions in backlink table views

commit 3351cce6fbe2caffa7f33951d8635a49253774d4
Author: James Stone <[email protected]>
Date:   Wed Aug 17 14:40:19 2016 +0200

    Add new file to xcode project.

commit 692f4149995c27ea6fe452f4f38c5f40e5142938
Merge: 2486c6d 9524e3e
Author: Finn Schiermer Andersen <[email protected]>
Date:   Wed Aug 17 12:40:14 2016 +0200

    Merge branch 'master' of https://github.com/realm/realm-core into fsa/threadsafe_descriptor_destruction

commit cd43323e67720f97dc66f541d090ec0b422ed86c
Author: Kristian Spangsege <[email protected]>
Date:   Wed Aug 17 05:08:55 2016 +0200

    Support for getting thread names (util::Thread::get_name())

commit 18ea78505d2b5485a3c757e10f183355de507e77
Merge: 376b8b1 ba96c24
Author: Kristian Spangsege <[email protected]>
Date:   Wed Aug 17 04:32:21 2016 +0200

    Merge branch 'master' into ks/allow-setting-thread-names

commit 9524e3e346c6e4884a47477334d853983baf56df
Merge: 8e49f01 a9a95b9
Author: Kristian Spangsege <[email protected]>
Date:   Wed Aug 17 00:09:20 2016 +0200

    Merge pull request #2045 from realm/ks/no-need-for-cfnetwork-framework

    CFNetwork framework no longer needed in core context

commit a9a95b97856d320cbb54a1b35b24d95915abc6d1
Author: Kristian Spangsege <[email protected]>
Date:   Tue Aug 16 22:50:54 2016 +0200

    CFNetwork framework no longer needed in core context

commit 8e49f019a98527ea43b714dadf0f1492cf5923ba
Author: Jaden Geller <[email protected]>
Date:   Tue Aug 16 08:26:02 2016 -0700

    Add version_id.hpp to Makefile (#2042)

commit 1a21dfe8eddcf860e1a338419ef682ff11982794
Author: Lasse Reinhold <[email protected]>
Date:   Tue Aug 16 15:39:27 2016 +0200

    Added two files to VS

commit bd0e07e78a0ccc6dc6d16ea057fa7912f186b4fc
Author: Lasse Reinhold <[email protected]>
Date:   Tue Aug 16 15:19:05 2016 +0200

    Line feeds and VS flags

commit 46d919a3c0f795d058fba818b13f8e5bf8f63320
Author: Lasse Reinhold <[email protected]>
Date:   Tue Aug 16 15:01:46 2016 +0200

    Made schema_dumper.cpp work in VS

commit 1f6d72a4653f0699ecdb0d5bc1c55a49fcacff63
Merge: e58e130 db73f6c
Author: Yavor Georgiev <[email protected]>
Date:   Tue Aug 16 13:36:48 2016 +0200

    Merge pull request #1804 from realm/yg/android-debug-information

    Only hide symbols for optimized Android builds

commit e58e130e371f8109c1d06dc7cdde914781708974
Merge: ba96c24 8fbc581
Author: Thomas Goyne <[email protected]>
Date:   Mon Aug 15 14:09:14 2016 -0700

    Merge pull request #2040 from realm/tg/valgrind

    Fix a valgrind error when cloning StringNodeBase

commit 4df541c6c55271984445f0d71c549af833534207
Author: Thomas Goyne <[email protected]>
Date:   Mon Aug 15 11:25:11 2016 -0700

    Support column insertions in backlink table views

commit 8fbc5819d7ebaf0428f69acc3672b18bd9e35ba0
Author: Thomas Goyne <[email protected]>
Date:   Mon Aug 15 10:56:30 2016 -0700

    Fix a valgrind error when cloning StringNodeBase

    The copy constructor branches on m_condition_column, so it needs to be
    initialized for the sake of the case where it's cloned before being used.

    Fixes #2039.

commit ba96c244eaad9f488abf341ee4941ed9d435b073
Merge: 6aba660 d41cc0d
Author: Lasse Reinhold <[email protected]>
Date:   Mon Aug 15 18:17:08 2016 +0200

    Merge pull request #2031 from realm/fsa/fix-fixme

    Fsa/fix fixme

commit d41cc0d63a37a398862e1a9548ed64092befd6ac
Author: Lasse Reinhold <[email protected]>
Date:   Mon Aug 15 17:10:48 2016 +0200

    Removed jenkins warning

commit 3963a8161b4e9472060b543948c854eaaefab925
Author: Lasse Reinhold <[email protected]>
Date:   Mon Aug 15 16:22:14 2016 +0200

    Clarified comment

commit 2de8e734f1213a845f9fcd76e5786aa87c70b4c1
Author: Lasse Reinhold <[email protected]>
Date:   Mon Aug 15 16:20:34 2016 +0200

    Cleanup of FIXMEs

commit 2486c6dfe7aef143b629483bef4f9492ce5cbb39
Author: Finn Schiermer Andersen <[email protected]>
Date:   Mon Aug 15 15:25:54 2016 +0200

    post review fixes

commit db73f6cefadf3bb9e65e23e644a97300b7c6a795
Author: Yavor Georgiev <[email protected]>
Date:   Fri May 13 12:09:45 2016 +0200

    Only hide symbols for optimized Android builds

commit 6aba6608fadb5fac564071ba21b594731e133ce7
Author: Chen Mulong <[email protected]>
Date:   Mon Aug 15 11:17:00 2016 +0800

    Use -fsigned-char to build (#2033)

    This is found when compiling realm-java with cmake. The different
    default sets on different targets cause linking failed with lto enabled.

    The problem is, cmake toolchain shipped with google sdk has
     -fsigned-char by default.
    See https://github.com/taka-no-me/android-cmake/blob/master/android.toolchain.cmake#L1237

    But the default gcc has different signed/unsigned for different
    targets, eg.: arm64 by default is unsigned-char.

commit 376b8b148e996720c578537a0939778a729a76ab
Merge: 20ec53c 85ec6b0
Author: Kristian Spangsege <[email protected]>
Date:   Sat Aug 13 01:06:35 2016 +0200

    Merge branch 'master' into ks/allow-setting-thread-names

commit 20ec53cdc310196467a5eaa16618526640a0afef
Author: Kristian Spangsege <[email protected]>
Date:   Fri Aug 12 23:47:13 2016 +0200

    Fix for: Support for setting thread names (util::Thread::set_name())

commit 98f82c29e3a3f7ab3eaf52d4562c273197c01d1d
Author: Mark Rowe <[email protected]>
Date:   Fri Aug 12 14:31:20 2016 -0700

    Support setting the thread name on Apple platforms.

    Apple's version of `pthread_setname_np` takes different arguments than
    the Linux version, and will itself truncate strings that are longer than
    its 64 byte size limit.

commit 85ec6b0c36e5b5157d6edac8645aff141e372d06
Author: Jaden Geller <[email protected]>
Date:   Fri Aug 12 12:06:01 2016 -0700

    Unnest `VersionID` and move to separate file (#2032)

commit 742a0d52538f72ffd468091ee4547bf8a1783250
Author: Kristian Spangsege <[email protected]>
Date:   Fri Aug 12 19:03:55 2016 +0200

    Support for setting thread names (util::Thread::set_name())

commit d9300d985bf9173c772488c5055f519091c3feea
Author: Finn Schiermer Andersen <[email protected]>
Date:   Fri Aug 12 14:28:09 2016 +0200

    one more warning

commit cb8d31eb9a0252705615450e7e0a3795af861377
Merge: 8e1fd15 33d540a
Author: Jørgen Edelbo <[email protected]>
Date:   Fri Aug 12 14:19:32 2016 +0200

    Merge pull request #2015 from realm/jed/remove-deprecated-functions

    Remove some deprecated functions

commit ecd1a0bb64d91a20a9feaae30a07c6e44c83df74
Author: Finn Schiermer Andersen <[email protected]>
Date:   Fri Aug 12 13:59:25 2016 +0200

    silenced a warning

commit aafc424e32ec60d3dcadc5fd8fb3ee28901747d3
Author: Finn Schiermer Andersen <[email protected]>
Date:   Fri Aug 12 12:41:09 2016 +0200

    release notes

commit b3c334edc9af6f3a5caf005109cc7cf57eec5f0b
Merge: fa5e65e 8e1fd15
Author: Finn Schiermer Andersen <[email protected]>
Date:   Fri Aug 12 12:34:45 2016 +0200

    Merge branch 'master' of https://github.com/realm/realm-core into fsa/threadsafe_descriptor_destruction

commit 8e1fd157b3baff9215610d20c57d143438446b5f
Author: Emanuele Zattin <[email protected]>
Date:   Fri Aug 12 12:33:30 2016 +0200

    Updated release notes

commit fa5e65e2761f9535976b785962533e1a8cf2121e
Author: Finn Schiermer Andersen <[email protected]>
Date:   Fri Aug 12 12:32:00 2016 +0200

    more testcases

commit ac080b0c3c1fb948e083540777710e2aa6639128
Merge: d3deee4 56ecf89
Author: Finn Schiermer Andersen <[email protected]>
Date:   Fri Aug 12 10:58:56 2016 +0200

    Merge branch 'mc/thread-safe-destructor-test' of https://github.com/realm/realm-core into fsa/threadsafe_descriptor_destruction

commit 56ecf890224cc1e8a2024e6a3ac7d1afbfc52f8f
Author: Chen Mulong <[email protected]>
Date:   Fri Aug 12 16:44:23 2016 +0800

    Finn asked for this :P

commit d3deee4694d86f70cd9f34d364094c53f0c72348
Author: Finn Schiermer Andersen <[email protected]>
Date:   Fri Aug 12 10:35:28 2016 +0200

    fixed infinite recursion, passes unittests, valgrind clean

commit 9b9d73f556968c4d532b9f99aecad3692051f705
Author: Finn Schiermer Andersen <[email protected]>
Date:   Thu Aug 11 23:41:33 2016 +0200

    using toombstones in the descriptor map (defunct)

commit fbb9f597dd40e37bcdabe498b1b51309da7055ea
Author: Finn Schiermer Andersen <[email protected]>
Date:   Thu Aug 11 17:54:20 2016 +0200

    use shared_ptr for descriptor (compiles, fails tests)

commit ee92e79d55a75ec4bc1754793c56e3a2ff472126
Merge: ccfb819 a9b127b
Author: Kristian Spangsege <[email protected]>
Date:   Thu Aug 11 14:11:09 2016 +0200

    Merge pull request #2027 from realm/ks/likely-assertions

    Tell the compiler that we expect assertion conditions to be true

commit c934a3d584a87335317f01299a94a07ffb3b6042
Author: Chen Mulong <[email protected]>
Date:   Thu Aug 11 19:54:41 2016 +0800

    Descriptor destructor thread-safety test

commit ccfb8190a069dbf746a1cb0bca16877a97102cff
Author: Finn Schiermer Andersen <[email protected]>
Date:   Wed Aug 10 19:30:03 2016 +0200

    version 1.5.0

commit cd728d6240db49bed4824b65bccd73a1d4278b3d
Merge: 6831710 4c5bcb4
Author: Finn Schiermer Andersen <[email protected]>
Date:   Wed Aug 10 19:18:28 2016 +0200

    Merge pull request #2030 from realm/revert-2014-mc/thread_safe_descriptor_safe

    Revert "Use shared_ptr for Descriptor"

commit 4c5bcb410a49c7b8fde8428899c74a596ab24729
Merge: 10ae2a0 6831710
Author: Finn Schiermer Andersen <[email protected]>
Date:   Wed Aug 10 17:08:03 2016 +0200

    Merge branch 'master' of https://github.com/realm/realm-core into revert-2014-mc/thread_safe_descriptor_safe

commit 68317104d189ada14c4e1b6417ca1f2cf51bcf84
Merge: 6f3b832 6b7e53c
Author: Thomas Goyne <[email protected]>
Date:   Wed Aug 10 07:24:14 2016 -0700

    Merge pull request #1995 from realm/tg/query-columns

    Rework Query initialization to support adding columns

commit 6b7e53cf8e1dd20b4a3ccbde3929d7669a231cc7
Merge: 6d3bca5 f1763df
Author: Thomas Goyne <[email protected]>
Date:   Wed Aug 10 07:23:53 2016 -0700

    Merge pull request #2011 from realm/tg/sort

    Add support for inserting columns after Sort/Distinct

commit 10ae2a0c7fc06848af0ec57ae6f5d45b94475192
Author: Finn Schiermer Andersen <[email protected]>
Date:   Wed Aug 10 16:08:36 2016 +0200

    Revert "Use shared_ptr for Descriptor"

commit a9b127b29c8f0c7b7e1138e78cae2eba74d00aeb
Author: Kristian Spangsege <[email protected]>
Date:   Wed Aug 10 14:12:53 2016 +0200

    Tell the compiler that we expect assertions to be true

commit 6d3bca5259876be5ee346f074fe2366da2591e5f
Author: Lasse Reinhold <[email protected]>
Date:   Wed Aug 10 11:42:32 2016 +0200

    VS project fix

commit f1763dfe868b5a9d973e026b69c6cd068b022a71
Author: Thomas Goyne <[email protected]>
Date:   Tue Aug 9 10:58:02 2016 -0700

    Update release notes

commit d0447dec056aeff3996d1d895965082964051d90
Author: Thomas Goyne <[email protected]>
Date:   Fri Aug 5 07:43:35 2016 -0700

    Enable -Wreorder in the Xcode project and fix warnings

commit e081aee43a8ef4127bb6b7777e37d33a63ab919b
Author: James Stone <[email protected]>
Date:   Fri Aug 5 14:33:57 2016 +0200

    Add more tests for new distinct across links and combinations of distinct and sort.

commit 473578746c209c17a60a037ce17b81469b9040b2
Author: Thomas Goyne <[email protected]>
Date:   Thu Aug 4 13:26:32 2016 -0700

    Remove rows with null links before sorting

commit 7badf1fc95751d314d28d4562f8196bdea7db91c
Author: Thomas Goyne <[email protected]>
Date:   Thu Aug 4 13:03:01 2016 -0700

    Exclude rows which do not link to the distinct column

commit 22d86ce0ec9ab005bd1ae2742caaaeee0c1563b4
Author: Thomas Goyne <[email protected]>
Date:   Thu Aug 4 11:29:13 2016 -0700

    Add tests for distinct over links

commit 3258e4f771e8b24f3894d884aff46d8e9080abcd
Author: Thomas Goyne <[email protected]>
Date:   Thu Aug 4 10:45:07 2016 -0700

    Add a few more asserts and comments

commit 6f1e58f5001b4d7772f5871b3d4f17f68f5208d9
Author: Thomas Goyne <[email protected]>
Date:   Mon Aug 1 09:50:35 2016 -0700

    Add support for inserting columns after Sort/Distinct

commit 5e3cf14138afb4eb591baed33636c3eb0d436ecd
Author: James Stone <[email protected]>
Date:   Fri Jul 15 16:13:37 2016 +0200

    Add support for sorting through links.

commit 6c3ba271ff3d6af58eda16325696ab017fc74815
Author: Thomas Goyne <[email protected]>
Date:   Tue Aug 9 10:56:35 2016 -0700

    Fix typo

commit 80e599156289d8c16809bbb177ea21ca470092ad
Author: Thomas Goyne <[email protected]>
Date:   Mon Aug 8 14:49:39 2016 -0700

    Move the position of REALM_NOINLINE to work with VC++

commit aa589129611753e340c9c0b4561c66de7ff9c2b7
Author: Thomas Goyne <[email protected]>
Date:   Mon Aug 8 11:38:45 2016 -0700

    Fix use of invalidated iterators when refreshing subtables

commit 95c7f26c21749ad466be4f3bd44a3d6710a11c65
Author: Thomas Goyne <[email protected]>
Date:   Thu Aug 4 14:13:02 2016 -0700

    Remove some now-redundant tracking of the origin column index in BacklinkColumn

commit 1222a91b9b4403af3aeba81d827804f72274712e
Author: Thomas Goyne <[email protected]>
Date:   Wed Aug 3 11:33:40 2016 -0700

    Move column_ndx after nullable in all of the constructor arg lists

commit a6d1b343a59cb248e4edb1df94cdde0b5899f255
Author: Thomas Goyne <[email protected]>
Date:   Wed Aug 3 11:29:16 2016 -0700

    Move the super call to the beginning of BinaryColumn::refresh_accessor_tree

commit b927788a0cb429b519fc32eb4e303631ef9b7fb4
Author: Thomas Goyne <[email protected]>
Date:   Thu Jul 21 09:05:37 2016 -0700

    Rework Query initialization to support adding columns

    This changes all query nodes to use the following pattern:

      1. On initial creation, store the passed-in column index.
      2. When the node is added to a Query, bind to that Query's table immediately
         rather than waiting until the Query is run, and never refer to the column
         index again after this.
      3. When cloning for handover, construct the new nodes using the column
         indexes from the actual columns rather than the originally passed-in values.

    The third part requires making it so that columns which are part of tables keep
    track of their logical index within the table. Table and Link columns did this
    already (although Link columns did not properly update it after new columns
    were added), so that functionality was just moved to ColumnBase.

commit 3ca0a5051a802296445636d6f07cf76a31f5b59d
Author: Thomas Goyne <[email protected]>
Date:   Fri Jul 29 11:16:42 2016 -0700

    Avoid throwing exceptions at the beginning of every test using a test path

commit b14738ac1bf817aaddc6f01fdd98ee528bf1b087
Author: Jørgen Edelbo <[email protected]>
Date:   Tue Aug 9 14:43:32 2016 +0200

    Fix according to review

    Move comment in exceptions.cpp
    Add tests to trigger File exceptions
    Expect excryption to be enabled while measuring test coverage

commit 6f3b8324c16c86720a27a5ed64d64a4b4d0ba65b
Merge: 61aaddc 7e65470
Author: Finn Schiermer Andersen <[email protected]>
Date:   Tue Aug 9 14:42:40 2016 +0200

    Merge pull request #2014 from realm/mc/thread_safe_descriptor_safe

    Use shared_ptr for Descriptor

commit 61aaddc9129eb973924d41ea0d71d037c70e1953
Merge: 68e6d29 05620a0
Author: Lasse Reinhold <[email protected]>
Date:   Tue Aug 9 14:33:16 2016 +0200

    Merge pull request #2010 from realm/lr/valgrind

    Fixes numerous Valgrind/Helgrind errors

commit 7e654706dc442e378690a1335e01b28d5aa353e5
Merge: 3c24e9a 68e6d29
Author: Finn Schiermer Andersen <[email protected]>
Date:   Tue Aug 9 14:19:46 2016 +0200

    Merge branch 'master' of https://github.com/realm/realm-core into mc/thread_safe_descriptor_safe

commit 3c24e9a9699cf69541b65c60c86427c57c99ec2c
Merge: b89bbae c04722c
Author: Finn Schiermer Andersen <[email protected]>
Date:   Tue Aug 9 14:18:05 2016 +0200

    Merge branch 'mc/thread_safe_descriptor_safe' of https://github.com/realm/realm-core into mc/thread_safe_descriptor_safe

commit 05620a086c24d4213f78c2466965194144b178c4
Author: Lasse Reinhold <[email protected]>
Date:   Wed Aug 3 16:52:36 2016 +0200

    Fixes numerous Valgrind/Helgrind errors

commit 68e6d29f196c2a97683a77eee46591fb7b5c034b
Merge: d8ce14a 70b1d19
Author: Finn Schiermer Andersen <[email protected]>
Date:   Tue Aug 9 10:24:13 2016 +0200

    Merge pull request #2005 from realm/mar/linklist-race

    Fix potential null pointer dereferences in LinkListColumn

commit c04722cfcfc6dd3b854667e60089204f2319dbf6
Author: Chen Mulong <[email protected]>
Date:   Tue Aug 9 13:53:19 2016 +0800

    Fix typos

commit 70b1d19da0f1db4ae7736f94a620c5108600df3c
Author: Mark Rowe <[email protected]>
Date:   Mon Aug 8 11:49:56 2016 -0700

    Remove a parameter that is no longer used.

commit b89bbaeb9986f1334ac93d5793250a35f44ad0a4
Merge: d8f74fc d8ce14a
Author: Finn Schiermer Andersen <[email protected]>
Date:   Mon Aug 8 14:41:34 2016 +0200

    Merge branch 'master' of https://github.com/realm/realm-core into mc/thread_safe_descriptor_safe

commit d8f74fc0235627b33469e5aedf99bc81b02aa25a
Author: Chen Mulong <[email protected]>
Date:   Mon Aug 8 17:53:43 2016 +0800

    Fix gcc warning

commit d8ce14a192df421f7296d7ca1fbbdab9823c16cb
Merge: 76ef2ec d51c47d
Author: James Stone <[email protected]>
Date:   Mon Aug 8 11:23:41 2016 +0200

    Merge pull request #1989 from realm/js/table-print

    Fix table print debug function.

commit 7ead80290272c519277586a3be5320c6b5264306
Author: Chen Mulong <[email protected]>
Date:   Mon Aug 8 16:31:24 2016 +0800

    Make Descriptor constructor private

    but also work with make_shared.
    Use auto and make_unique to avoid restating types.

commit 33d540ab741f9ede3bc372e36a13c42e313fa5cb
Author: Jørgen Edelbo <[email protected]>
Date:   Mon Aug 8 10:09:41 2016 +0200

    Remove some deprecated functions

    std::bind1st and std::mem_fun are deprecated in C++11 ...

commit 116c3b1b250939720600f3b16016f3b770507bad
Author: Chen Mulong <[email protected]>
Date:   Mon Aug 8 13:44:56 2016 +0800

    Restrict Descriptor::detach usage outside

commit 76ef2ec068269040ced5b88d67f7e59076778f92
Merge: f324726 aad75d3
Author: Thomas Goyne <[email protected]>
Date:   Fri Aug 5 07:00:22 2016 -0700

    Merge pull request #2012 from realm/tg/column-is-null

    Short-circuit is_null() if nullable is false

commit aad75d395b9771b553fdce0d8fd50cd278553c09
Author: Thomas Goyne <[email protected]>
Date:   Fri Aug 5 06:59:56 2016 -0700

    Update release notes

commit f3247268c23bc777725fc081b66b3fd8f91b08ae
Merge: fdadf79 9c3ec18
Author: James Stone <[email protected]>
Date:   Fri Aug 5 15:13:29 2016 +0200

    Merge pull request #2016 from realm/js/update-missed-header

    Update header in recently added file.

commit 9c3ec1889b4f083de76b3477c0f90e5e8a3453b0
Author: James Stone <[email protected]>
Date:   Fri Aug 5 14:49:16 2016 +0200

    Update header in recently added file.

commit 8c3fb1a047aecd2de5750e5d83a12de138620dce
Author: Chen Mulong <[email protected]>
Date:   Fri Aug 5 17:24:26 2016 +0800

    Fix a misusing of get_subdesc_accessor

    get_subdesc_accessor will return null if the given column index is not
    found in the sub descriptor map which doesn't seem to be right.

    Use the Descriptor::get_subdescriptor in the group instead.
    Remove get_subdesc_accessor since it doesn't seem to be usefull outside.

commit 5cb83520a9ddbcae3e78f3e0c813338d59ba82e8
Author: Chen Mulong <[email protected]>
Date:   Fri Aug 5 16:46:38 2016 +0800

    Use shared_ptr for Descriptor

    To ensure the thread safety of destructors.

    Root descriptor is created by table which also keeps a shared ref
    on it. Sub descriptor is created by root descriptor which also keeps
    a shared ref on it. This means for most cases, the descriptors live
    as long as the root table. Don't hold a shared ref on it to avoid
    circular refs.

commit 22eac95f0dc54bbf16e7f7d94f50c666480bc827
Author: Mark Rowe <[email protected]>
Date:   Thu Aug 4 18:01:42 2016 -0700

    Expand tests for concurrent deletion of `LinkView`s.

    The mutator now chooses between adding new rows to the `LinkView` and
    removing rows from the origin table.

commit 743b52dc1fd751c40f9bd9bc109539e61b366967
Author: Mark Rowe <[email protected]>
Date:   Tue Aug 2 10:12:50 2016 -0700

    Add an entry to the release notes.

commit 16b35dd28d1f64637ba2ac55ced04f8b0e0ccc88
Author: Mark Rowe <[email protected]>
Date:   Tue Aug 2 08:46:49 2016 -0700

    Use `LinkViewRef` consistently within `LinkListColumn`

    Rather than a mismatch of `LinkViewRef` and `std::shared_ptr<LinkView>`.

commit 24123229c4acd431cd132e9a5f5dbe963b4ef4d7
Author: Mark Rowe <[email protected]>
Date:   Tue Aug 2 08:40:49 2016 -0700

    Ensure that the `LinkView` stored in the list entry is non-null before accessing it.

    It can become null at any time as a result of the `LinkView` being
    deallocated on a different thread. `LinkListColumn` was handling this
    correctly in all but a few cases.

commit d370a72aa7581aa90f9225cf0acca048b3dce918
Author: Thomas Goyne <[email protected]>
Date:   Thu Aug 4 14:36:53 2016 -0700

    Short-circuit the null check in all column types

commit e2bd1960e34136ab8be7c2de0027e7c59d3330c4
Author: Finn Schiermer Andersen <[email protected]>
Date:   Thu Aug 4 17:11:33 2016 +0200

    all a and b

commit 8e8d0090f23810bd6c58574e1d2cccca64b253a2
Author: Finn Schiermer Andersen <[email protected]>
Date:   Thu Aug 4 16:06:33 2016 +0200

    group_shared

commit 5a487c403b07171b8afd36795057ca6b2b7b6e62
Author: Finn Schiermer Andersen <[email protected]>
Date:   Thu Aug 4 15:34:14 2016 +0200

    fix in array

commit fdadf790322133a9a1447da0aa13bc9c1f85673b
Merge: 70bea37 fc13a39
Author: James Stone <[email protected]>
Date:   Thu Aug 4 11:35:18 2016 +0200

    Merge pull request #1996 from realm/js/disable-large-memory-test

    Disable the test which is causing valgrind to fail.

commit ef48c7907b837ac3cdafd0e41b560155a2c09c53
Author: Thomas Goyne <[email protected]>
Date:   Wed Aug 3 15:37:38 2016 -0700

    Short-circuit is_null() if nullable is false

    Cuts the runtime of sorting on a non-nullable int column in half.

commit 70bea37ccd55c0390e468a84e7355617b829ee2a
Merge: 98a26c6 aa2d22e
Author: Thomas Goyne <[email protected]>
Date:   Wed Aug 3 10:45:04 2016 -0700

    Merge pull request #2006 from realm/tg/columnbase

    Fold ColumnTemplateBase into ColumnBase

commit aa2d22e0e411330395aacb32d0b1a17f3bb134a2
Author: Thomas Goyne <[email protected]>
Date:   Wed Aug 3 09:48:52 2016 -0700

    Override compare_values in BacklinkColumn

commit 778f21b10e33660f711341a9e5baaaa13b36766c
Author: Thomas Goyne <[email protected]>
Date:   Tue Aug 2 13:20:11 2016 -0700

    Fold ColumnTemplateBase into ColumnBase

commit 98a26c6de3ae13137f5e2112f6c9bc326c804c65
Merge: 6fca4f5 a986b46
Author: James Stone <[email protected]>
Date:   Wed Aug 3 15:20:42 2016 +0200

    Merge pull request #2002 from realm/js/ignore-apple-attributes

    Git ignore apple attributes.

commit 6fca4f574ea2c718cbc7e1d4a36c4537e41ac16b
Merge: f642cbf 0370369
Author: James Stone <[email protected]>
Date:   Wed Aug 3 14:58:16 2016 +0200

    Merge pull request #1993 from realm/js/remove-android-tmp

    Remove temporary directories for build-android and build-node.

commit f642cbf46f51628ffab9f9cb1475080dbe9835c2
Merge: e3fe092 4ff1340
Author: James Stone <[email protected]>
Date:   Wed Aug 3 14:57:19 2016 +0200

    Merge pull request #1997 from realm/js/update-headers

    Update license headers for open source.

commit a986b462cadcfc672758d2a774352d35b91f0ee8
Author: James Stone <[email protected]>
Date:   Wed Aug 3 14:54:25 2016 +0200

    Unnecessarily greedy ignore.

commit a6a9f6ac1c99da482ba3a336b2d450bfa609731e
Author: Jørgen Edelbo <[email protected]>
Date:   Tue Jul 26 13:33:21 2016 +0200

    Test BasicArray<T>::lower_bound and BasicArray<T>::upper_bound

    FloatColumn uses these templates

commit 77f413a92dcca8c596b4bca1d01b6b8950e620d9
Author: Jørgen Edelbo <[email protected]>
Date:   Tue Jul 26 13:31:34 2016 +0200

    Excluding more code from test coverage measurement

commit e04ccc9b0a14fc4390329c33a1c9a9e9e2bc085e
Author: Jørgen Edelbo <[email protected]>
Date:   Tue Jul 26 11:07:27 2016 +0200

    Improving test coverage on Version

commit 609dbc1bdadd135bfaeb46a3a20e3ae9cc83db01
Author: Jørgen Edelbo <[email protected]>
Date:   Tue Jul 26 11:06:55 2016 +0200

    Improving test coverage on StringEnumColumn

commit a1887c5546f772b03482ef12b4f6f3e141a275f8
Author: Jørgen Edelbo <[email protected]>
Date:   Mon Jul 25 15:21:46 2016 +0200

    Improving test coverage on ColumnBase

commit 44c3a5c09d16162f3d6c35c2d85d644b64a08d5c
Author: Jørgen Edelbo <[email protected]>
Date:   Mon Jul 25 15:20:57 2016 +0200

    Improving test coverage on binary column

commit ad7602f0aeeb6639697af6c7a353c23b3d8e2b62
Author: Jørgen Edelbo <[email protected]>
Date:   Mon Jul 25 11:18:11 2016 +0200

    Improving test coverage on util::File

commit e3fe0921b5280683fac7f00aebfc60454afbff6e
Merge: d16a9e0 3c69cef
Author: James Stone <[email protected]>
Date:   Wed Aug 3 14:02:21 2016 +0200

    Merge pull request #1961 from realm/sl/YouCompleteMe

    Add good default YouCompleteMe configuration file

commit d16a9e01ca46af55783140df81ea4bd9cacf2ecb
Author: Emanuele Zattin <[email protected]>
Date:   Wed Aug 3 13:55:12 2016 +0200

    Updated release notes

commit 0e819d77eb93389daa83b83f075c85ea2f11cd69
Merge: fb31902 a3041fb
Author: James Stone <[email protected]>
Date:   Wed Aug 3 11:58:18 2016 +0200

    Merge pull request #2007 from realm/js/rc-1.4.2

    Prepare for 1.4.2 release.

commit a3041fb5bd9d83627d029274e23b57a19646954d
Author: James Stone <[email protected]>
Date:   Wed Aug 3 10:28:11 2016 +0200

    Bump version to 1.4.2.

commit fb31902937f0bf2dbb88a7ea808b8708c2f14546
Author: Chen Mulong <[email protected]>
Date:   Tue Aug 2 20:31:49 2016 +0800

    Fix win build error for UniqueID (#2003)

commit b7b85efaa165398dd4d551e6dbf2b6eaca26f970
Merge: 08a3f32 3beb6e3
Author: Søren Vind <[email protected]>
Date:   Tue Aug 2 14:31:29 2016 +0200

    Merge pull request #2004 from realm/sv/cheetah-install

    Update README.md

commit bdbbce1dd1191a323671f5f9f420dbe93f812ef4
Author: James Stone <[email protected]>
Date:   Tue Aug 2 13:47:06 2016 +0200

    Git ignore apple attributes.

commit 4ff13409628117cb597cc4d0e48ac54bd1bb032c
Author: James Stone <[email protected]>
Date:   Tue Aug 2 12:34:18 2016 +0200

    Ensure there are spaces after headers (consistency).

commit 08a3f32024fd984f628e6ab99d94d1e3a72d8c11
Merge: cd892a4 2a27849
Author: Lasse Reinhold <[email protected]>
Date:   Tue Aug 2 11:18:59 2016 +0200

    Merge pull request #1979 from realm/mar/windows-verbose-tests

    Don't report test progress by default on Windows

commit cd892a4fc6eb133d53116bdd92a31b2b6ffe8fb3
Merge: 4cbf0de aa540e8
Author: Lasse Reinhold <[email protected]>
Date:   Tue Aug 2 10:52:08 2016 +0200

    Merge pull request #1991 from realm/lr/memory2

    Memory allocator: Increase by 20% instead of doubling, and round up t…

commit 3beb6e37e9b3c1e097f9a9fbd609e2ed308e11a9
Author: Søren Vind <[email protected]>
Date:   Tue Aug 2 10:03:16 2016 +0200

    Update README.md

    Cheetah install steps for OSX, brew + pip

commit 4cbf0de58379a9577239e736adc7e3ebadd30ad1
Merge: 9a99396 3a33817
Author: Thomas Goyne <[email protected]>
Date:   Mon Aug 1 10:17:27 2016 -0700

    Merge pull request #1999 from realm/tg/fix-xcode-project

    Update Xcode project for 9da7f4a02439779c136d01df81c8f1f0f50f2c65

commit 3a3381714e9b7631b09f9e18fbe45b98b5a1ca05
Author: Thomas Goyne <[email protected]>
Date:   Mon Aug 1 10:08:02 2016 -0700

    Update Xcode project for 9da7f4a02439779c136d01df81c8f1f0f50f2c65

commit 9a9939620dd516ef2d897e366b66cd53a26d0f57
Merge: b1d0334 5601a90
Author: Finn Schiermer Andersen <[email protected]>
Date:   Mon Aug 1 17:24:43 2016 +0200

    Merge pull request #1986 from realm/mc/bug/robust-mutex-local-fix

    Fix local mutex for robus mutex emulation

commit ba1baac0171f5ad4fb6795321e4f29aaccd0f4c3
Merge: c2d7932 b1d0334
Author: James Stone <[email protected]>
Date:   Mon Aug 1 16:14:42 2016 +0200

    Merge branch 'master' into js/update-headers

commit c2d7932f57e6950a4de6ec9ec5ae201321887cb5
Author: James Stone <[email protected]>
Date:   Mon Aug 1 15:57:44 2016 +0200

    Update release notes (internal change).

commit 540ee0b0f249dac63584189d5cd8e14b951a0f99
Author: James Stone <[email protected]>
Date:   Mon Aug 1 15:54:43 2016 +0200

    Update license in non-c++ files.

commit ee3d37e5008e4677ed3feb2d5feb5ebcb3275f94
Author: James Stone <[email protected]>
Date:   Mon Aug 1 11:46:43 2016 +0200

    Update license for cpp files.

commit b1d03342ec11c99104c49ad2c35da4e99762e24a
Merge: d1d194f 9da7f4a
Author: Kristian Spangsege <[email protected]>
Date:   Mon Aug 1 12:28:30 2016 +0200

    Merge pull request #1994 from realm/ks/move-util-uri-to-sync

    'realm/util/uri.{h|c}pp' moved away

commit 3c69cef94a976741437c8e30aee5693024f103ba
Author: Sebastian Lauwers <[email protected]>
Date:   Mon Aug 1 11:52:27 2016 +0200

    Rename YCM configuration file

commit b31eb0b45ec0e7ef0316ff6c388625dcedbe8436
Author: Sebastian Lauwers <[email protected]>
Date:   Tue Jul 12 13:59:30 2016 +0200

    Add good default YouCompleteMe configuration file

commit 84c37f101cdb4f7f522f6524c74b8ec286539875
Author: James Stone <[email protected]>
Date:   Mon Aug 1 11:24:40 2016 +0200

    Update header license of hpp files.

commit 5b1883872c6c38f6fcbb30993df657da770bb641
Author: James Stone <[email protected]>
Date:   Mon Aug 1 10:56:04 2016 +0200

    Update license for h files.

commit 5601a908cdf5962c1758ac1b0688aa3cb61940e1
Author: Chen Mulong <[email protected]>
Date:   Mon Aug 1 15:55:41 2016 +0800

    Fix lint warning

commit fc13a3931534d33e57eba7a17fdb80f21c2f26d7
Author: James Stone <[email protected]>
Date:   Mon Aug 1 09:48:26 2016 +0200

    Disable the test which is causing valgrind to fail.

commit d3490498c9dadd4ab8e391ef5d450ea977a09aa2
Author: Chen Mulong <[email protected]>
Date:   Mon Aug 1 10:29:34 2016 +0800

    Fix corner case with multi processes

commit 7b55d2d34a423bf32b920c5d027cc39ac7fe4df9
Author: Chen Mulong <[email protected]>
Date:   Mon Aug 1 10:03:01 2016 +0800

    Fix release notes during merge

commit a8c2c2240ea16f87c101fd5591584afc98fe4843
Merge: bf23de1 d1d194f
Author: Chen Mulong <[email protected]>
Date:   Mon Aug 1 09:54:14 2016 +0800

    Merge remote-tracking branch 'origin/master' into mc/bug/robust-mutex-local-fix

commit 9da7f4a02439779c136d01df81c8f1f0f50f2c65
Author: Kristian Spangsege <[email protected]>
Date:   Fri Jul 29 17:01:24 2016 +0200

    'realm/util/uri.{h|c}pp' moved away

commit d1d194f72c43823809a4e1d302d2f90b9fab1c73
Author: Emanuele Zattin <[email protected]>
Date:   Fri Jul 29 15:15:13 2016 +0200

    Updated release notes

commit 0370369e6015baf9faea7bae8193ae166e6bc445
Author: James Stone <[email protected]>
Date:   Fri Jul 29 14:17:45 2016 +0200

    Remove temporary directories for build-android and build-node.

commit 813ed2a80901bbee0190c3d36bb27f54f67e2304
Merge: 3f64d90 0c951c5
Author: Morten Krogh <[email protected]>
Date:   Fri Jul 29 13:53:54 2016 +0200

    Merge pull request #1992 from realm/mk/release

    Bump version for release 1.4.1

commit 3f64d909966851614517764539b782bb75ad2de9
Merge: 5179803 2f8c1db
Author: Simon Ask <[email protected]>
Date:   Fri Jul 29 13:49:05 2016 +0200

    Merge pull request #1987 from realm/su/remove-network-library

    Remove networking library

commit 0c951c5d24748c1731433628a9bcd00e29b50518
Author: Morten Krogh <[email protected]>
Date:   Fri Jul 29 13:22:14 2016 +0200

    Bump version for release 1.4.1

commit bf23de16b8dd0d7bc8b925356fc964d4437af661
Author: Chen Mulong <[email protected]>
Date:   Fri Jul 29 18:12:21 2016 +0800

    Workaround for bug in NDK's sys/stat.h

commit aa540e801280b9221b888dc562e58cddefedfb5e
Author: Lasse Reinhold <[email protected]>
Date:   Fri Jul 29 12:00:45 2016 +0200

    Memory allocator: Increase by 20% instead of doubling, and round up to page size instead of 256

commit 51092a0ae2b1d89faa0baea99d3c4f1cff8e7f1b
Author: Chen Mulong <[email protected]>
Date:   Fri Jul 29 17:26:49 2016 +0800

    Revert "Fix more warning"

    This reverts commit f063e9af11771ae8d6cca0f6766a84333ed41447.

commit d51c47da5df4db328716db8555c899f1483b4b0d
Author: James Stone <[email protected]>
Date:   Fri Jul 29 10:04:05 2016 +0200

    Fix table print debug function.

commit ab4c9713fa5fec2989305ed13a91e43793cac348
Merge: 51ebc28 5179803
Author: Chen Mulong <[email protected]>
Date:   Fri Jul 29 10:00:27 2016 +0800

    Merge remote-tracking branch 'origin/master' into mc/bug/robust-mutex-local-fix

commit 5179803a29be348400a7d8ea04e8de895d409590
Author: Chen Mulong <[email protected]>
Date:   Fri Jul 29 09:58:51 2016 +0800

    Workaround for mkfifo bug on BB devices (#1985)

    Fix for https://github.com/realm/realm-java/issues/3178

    BB 10's mkfifo() has a bug. When the fifo file exists, from the
    document, errno EEXIST should be set. But instead, it fails with
    error ENOSYS which is translated to exception message "Function
    not implemented".

    To solve this, we use stat to check if the path exists and it is
    a fifo.

commit a4a9c50641049584cc544bd8f4b7497060c4d3eb
Merge: e0aa75b 1d903c7
Author: Thomas Goyne <[email protected]>
Date:   Thu Jul 28 17:19:14 2016 -0700

    Merge pull request #1975 from realm/tg/query-operators

    Fix incorrect definitions of a few query operators

commit 51ebc2811b8acfc23970c6d9e8b9716b5c131b85
Merge: a4a6136 e0aa75b
Author: Finn Schiermer Andersen <[email protected]>
Date:   Thu Jul 28 17:32:48 2016 +0200

    Merge branch 'master' of github.com:realm/realm-core into mc/bug/robust-mutex-local-fix

commit a4a61367583426e5991ac1b2a55c654605cdc9aa
Merge: 152d76e f063e9a
Author: Finn Schiermer Andersen <[email protected]>
Date:   Thu Jul 28 16:30:46 2016 +0200

    Merge branch 'mc/bug/robust-mutex-local-fix' of github.com:realm/realm-core into mc/bug/robust-mutex-local-fix

commit 152d76e06c22a3b48380b3faa77e1060101ec6f5
Author: Finn Schiermer Andersen <[email protected]>
Date:   Thu Jul 28 16:30:02 2016 +0200

    attempted fix of warning

commit f063e9af11771ae8d6cca0f6766a84333ed41447
Author: Chen Mulong <[email protected]>
Date:   Thu Jul 28 21:51:16 2016 +0800

    Fix more warning

commit e0aa75bd248b74a9cc9d74f7616ed93c86063c4e
Merge: 75807f8 3b99e47
Author: Jørgen Edelbo <[email protected]>
Date:   Thu Jul 28 15:26:45 2016 +0200

    Merge pull request #1982 from realm/jed/remove-no_prealloc_tag

    Remove "no_prealloc_tag" constructors

commit 2c52dadffd6802d814b64885b78bb52c14afaafd
Author: Chen Mulong <[email protected]>
Date:   Thu Jul 28 19:57:28 2016 +0800

    Fix warnings

commit 2f8c1dba3a3af30368616ab0a9cdaf346abdbd46
Merge: 11bc3d9 75807f8
Author: Simon Ask Ulsnes <[email protected]>
Date:   Thu Jul 28 13:54:35 2016 +0200

    Merge branch 'master' into su/remove-network-library

commit 11bc3d9bd8507406b2ce3c9f7ac78c080094bb10
Author: Simon Ask Ulsnes <[email protected]>
Date:   Thu Jul 28 13:38:01 2016 +0200

    Remove networking library

commit dca07db60e6ee1691ec79c80ccc9f415d8e17b82
Author: Chen Mulong <[email protected]>
Date:   Thu Jul 28 19:27:08 2016 +0800

    Reduce FD number for robust mutex emulation

    * Add File::get_unique_id()
    * Use File::UniqueID to distinguish the InterprocessMutex
    * Multi InterprocessMutex pointed to the same file share the same file
      descriptor.

commit 75807f807fc9fc60b6bf8245d503a965fb9599a0
Merge: d9ef741 26a67ca
Author: Finn Schiermer Andersen <[email protected]>
Date:   Thu Jul 28 12:09:43 2016 +0200

    Merge pull request #1984 from realm/fsa/reduce_open_files

    Disabling async commit on Android to cut number of open files in half

commit 26a67ca9bc369843f947bc0a21fd86a3c50f1ea9
Author: Finn Schiermer Andersen <[email protected]>
Date:   Wed Jul 27 15:34:22 2016 +0200

    release note added

commit 73873dcc7befe50654fc161b3503f78e47875778
Author: Chen Mulong <[email protected]>
Date:   Wed Jul 27 20:45:01 2016 +0800

    Fix local mutex for robus mutex emulation

    The InterprocessMutex with the same filename should share the same local
    mutex.

    This was found when debugging
    https://github.com/realm/realm-java/issues/3178 .
    flock doesn't work properly on BB devices. But at least the local mutex
    should when use single process.

commit ab796df59f12f73dda9871e9c487b83f2e3f4003
Author: Finn Schiermer Andersen <[email protected]>
Date:   Wed Jul 27 13:14:53 2016 +0200

    post review fix

commit d9ef7411b10e6ac7540df2692774264922e3e764
Merge: 1baaf0b 6e8c164
Author: Mark Rowe <[email protected]>
Date:   Tue Jul 26 11:51:59 2016 -0700

    Merge pull request #1980 from realm/mar/optional-c++14

    Remove emulation of C++14 features in `Optional`

commit 1baaf0b7302b37695f2e6e046efd616f28e54eb4
Merge: 3b9c1b4 722e36e
Author: Mark Rowe <[email protected]>
Date:   Tue Jul 26 10:45:34 2016 -0700

    Merge pull request #1978 from realm/mar/fix-windows-build

    Fix building on Windows

commit a86b2f79d8e419a123da0892bc78ad423652856b
Author: Finn Schiermer Andersen <[email protected]>
Date:   Tue Jul 26 15:03:11 2016 +0200

    disabled async commit on Android

commit dc42442de779bb9ce7e38506bb8badc110871e75
Author: Finn Schiermer Andersen <[email protected]>
Date:   Tue Jul 26 15:02:18 2016 +0200

    eliminated a mutex and some condvars not needed if no async commit

commit 3b99e4716903df58dd9cb8ce28d05f8da0c8e6d0
Author: Jørgen Edelbo <[email protected]>
Date:   Tue Jul 26 14:17:40 2016 +0200

    Remove "no_prealloc_tag" constructors

    Not used. Odd concept. Array object not fully functional as m_alloc is
    invalid.

commit 3b9c1b409d710c7a1e1d617530ebc2487ee7e2c6
Merge: 403bcec 8b0ca21
Author: Jørgen Edelbo <[email protected]>
Date:   Tue Jul 26 14:23:24 2016 +0200

    Merge pull request #1976 from realm/jed/global_variable_in_test

    Enable parallel execution of TypeList_Basic

commit 722e36e63c5b420917541941dcdc8114ec287f1a
Author: Mark Rowe <[email protected]>
Date:   Mon Jul 25 16:18:26 2016 -0700

    Change the Debug|x64 configuration to inherit include and library paths.

    The custom settings don't work with Visual Studio 2015 Update 3. The
    inherited defaults are already used by the Release|x64 configuration,
    and appear to have been working fine with earlier versions of Visual
    Studio 2015.

commit 6e8c164098f62c04956b5fd7194d332e0d5ad804
Author: Mark Rowe <[email protected]>
Date:   Mon Jul 25 14:11:54 2016 -0700

    Remove emulation of C++14 features in `Optional`

commit 2a27849e9ac84f9683d65ac38cce10d878457c86
Author: Mark Rowe <[email protected]>
Date:   Mon Jul 25 14:07:25 2016 -0700

    Don't report test progress by default on Windows.

    It makes it difficult to see which tests failed in the output window.

commit e279e9201727d8b3722857f26085a9b1b3592433
Author: Mark Rowe <[email protected]>
Date:   Mon Jul 25 14:02:09 2016 -0700

    Don't include unistd.h and poll.h unless condition variable emulation is
    enabled.

    Fixes building on Windows.

commit 1d903c7ca3117f713d20d9964cae83a2421d2846
Author: Lasse Reinhold <[email protected]>
Date:   Mon Jul 25 15:54:18 2016 +0200

    * Unit test to expose the fixed query bug
    * Fixed another query bug (fallback to old query_engine in the wrong situation)

commit 403bcecae139a31d870c0f23e954f5094085efbd
Merge: ff338ff 9cc2030
Author: Lasse Reinhold <[email protected]>
Date:   Mon Jul 25 12:25:52 2016 +0200

    Merge pull request #1974 from realm/lr/valgrind_fix

    Fixed systme close(-1) error reported by Valgrind

commit 8b0ca21666b0581f07348041042188976ba54eec
Author: Jørgen Edelbo <[email protected]>
Date:   Thu Jul 21 11:23:36 2016 +0200

    Enable parallel execution of TypeList_Basic

    Static variable is now protected by mutex.

    Fixes #1936

commit d3a713bb1974481a9bbaf15cc2bd0cc5dcddfb4c
Author: Thomas Goyne <[email protected]>
Date:   Wed Jul 20 16:11:42 2016 -0700

    Fix incorrect definitions of a few query operators

    `double < column` truncated the double to a float and `float < column`
    truncated the float to an int. Eliminate the potential for this problem
    entirely by rearranging the template parameters to `create<>()` so that the
    types of the values can be inferred.

commit ff338ff1841fb76c3a0cd98480ec11ccc1b1f13e
Merge: 2373d09 eefc348
Author: Thomas Goyne <[email protected]>
Date:   Wed Jul 20 14:11:47 2016 -0700

    Merge pull request #1963 from realm/tg/xcode-project

    Move files to the correct target in the Xcode project

commit 9cc2030bbf329b92b063388007795ec26eeb452b
Author: Lasse Reinhold <[email protected]>
Date:   Wed Jul 20 16:50:44 2016 +0200

    Fixed systme close(-1) error reported by Valgrind

commit 2373d09c1a0e5067d3c20c16895d7dfd0055d202
Merge: fe15614 1306f7c
Author: Morten Krogh <[email protected]>
Date:   Wed Jul 20 15:49:15 2016 +0200

    Merge pull request #1973 from realm/mk/memory-stream

    MemoryInputStream support for tellg() and seekg().

commit 1306f7c8dc5bf7eb13261c964b81db986d75b574
Author: Morten Krogh <[email protected]>
Date:   Wed Jul 20 15:21:02 2016 +0200

    memory input stream corrections

commit 41ea5a50c79877a925326f167e6c38f866c904e8
Merge: 58fad31 f13956f
Author: Morten Krogh <[email protected]>
Date:   Wed Jul 20 14:21:01 2016 +0200

    Merge branch 'mk/memory-stream' of github.com:realm/realm-core into mk/memory-stream

commit 58fad314b07e36f649de404b9b466eec1030b2b9
Author: Morten Krogh <[email protected]>
Date:   Wed Jul 20 14:20:31 2016 +0200

    release notes

commit 7255f2b072d8f8d855a45773e2f88d34281e5f71
Author: Morten Krogh <[email protected]>
Date:   Wed Jul 20 13:33:51 2016 +0200

    util::MemoryInputStream is enhanced to support tellg() and
    seekg().

    A unit test for util::MemoryInputStream is added.

commit fe156149c2a1555fe6c47072f78e40f0b6bdea8f
Merge: 8ebcdf1 dcb14e4
Author: Oleks <[email protected]>
Date:   Wed Jul 20 14:19:37 2016 +0200

    Merge pull request #1693 from realm/os/core-builds

    A script for building core(s)

commit f13956f9915074d24e8f14ab562b9dd5cc9d62b5
Author: Morten Krogh <[email protected]>
Date:   Wed Jul 20 13:33:51 2016 +0200

    util::MemoryInputStream is enhanced to support tellg() and
    seekg().

    A unit test for util::MemoryInputStream is added.

commit 8ebcdf1b89c4dbe58ff6c6d5972277747fb81847
Merge: d53064e 93c3c37
Author: Kristian Spangsege <[email protected]>
Date:   Tue Jul 19 12:26:00 2016 +0200

    Merge pull request #1952 from realm/yg/simulated_failure_pthreads

    simulated_failure shouldn't use thread_local on Android

commit d53064e797beaf9893be220a2f45e8ef0365512e
Merge: 441449f 02904ad
Author: Morten Krogh <[email protected]>
Date:   Mon Jul 18 14:15:43 2016 +0200

    Merge pull request #1970 from realm/mk/spelling-mistakes

    spelling mistakes

commit 02904ad2d640cbb17c4059e903715071586fc6ad
Author: Morten Krogh <[email protected]>
Date:   Mon Jul 18 13:50:58 2016 +0200

    spelling mistakes

commit 441449fb6d65d477473707175836f4dd5858fc84
Author: Emanuele Zattin <[email protected]>
Date:   Thu Jul 14 10:51:17 2016 +0200

    Updated release notes

commit 9ab58692980087c94c1cab838862c494e5bc0d9b
Author: James Stone <[email protected]>
Date:   Thu Jul 14 09:44:18 2016 +0200

    Bump version to 1.4.0.

commit 3022ab5e32e30d4575cebaaf68b3f71c49da57c6
Author: James Stone <[email protected]>
Date:   Thu Jul 14 09:43:02 2016 +0200

    Moved release notes around.

commit 6e6a01612f3f55f8068032eb449e2614f7bf5753
Author: Emanuele Zattin <[email protected]>
Date:   Wed Jul 13 13:07:01 2016 +0200

    Updated release notes

commit 68958f80fac612d039ef5fecd40508fc17055e95
Merge: 0b63291 8ea4347
Author: James Stone <[email protected]>
Date:   Wed Jul 13 11:37:17 2016 +0200

    Merge pull request #1965 from realm/js/rc-1.3.1

    Bug fix release 1.3.1

commit 8ea4347a0e56c449a338d9c0a01f7d34ddfff87f
Author: James Stone <[email protected]>
Date:   Wed Jul 13 11:11:36 2016 +0200

    Update release notes.

commit 7e2d597f7863a229d9c2d9008365a3112cea1225
Author: James Stone <[email protected]>
Date:   Wed Jul 13 11:09:47 2016 +0200

    Bump version to 1.3.1.

commit 0b63291d5448d1136285236b770db9fac5e64be8
Merge: 8310843 01887df
Author: James Stone <[email protected]>
Date:   Wed Jul 13 11:04:40 2016 +0200

    Merge pull request #1962 from realm/tg/row-wrappers

    Add missing wrappers to Row

commit 8310843ff36ec22b502dfa2177180b356196e26e
Merge: 9d37267 030f6f3
Author: James Stone <[email protected]>
Date:   Wed Jul 13 11:04:18 2016 +0200

    Merge pull request #1960 from realm/js/backlink-updates

    Bump table version through links

commit 030f6f3762e2a452e3572d143c5832687c9e102f
Author: James Stone <[email protected]>
Date:   Mon Jul 11 16:32:41 2016 +0200

    Added additional comments.

commit 835442b2c0d9c52a3ebf2b8e7f284335310c45f6
Author: James Stone <[email protected]>
Date:   Mon Jul 11 14:53:50 2016 +0200

    Bump version through forward linked tables. Made the test check for LinkList types too.

commit c1e53b9b3dfa825e7337b854fd1e3daeb4ee812f
Author: James Stone <[email protected]>
Date:   Fri Jul 8 17:13:25 2016 +0200

    Add failing test case.

commit eefc348e1942e3dbfcbb6761b07010ed0965a627
Author: Thomas Goyne <[email protected]>
Date:   Tue Jul 12 15:11:09 2016 -0700

    Move files to the correct target in the Xcode project

    A bunch of the tests for util functionality were in the test-utils library
    (i.e. the helper library for the tests) rather than the unit tests target,
    which resulted in it not compiling. Fixing this resulted in Xcode changing the
    UID for a bunch of files. I'm not sure why.

commit 01887dffb2c1ecd390929e976684831f4b5df0ca
Author: Thomas Goyne <[email protected]>
Date:   Tue Jul 12 15:03:59 2016 -0700

    Add missing wrappers to Row

    `get<>()`, `set_int_unique()`, and `set_string_unique()` were added to `Table`
    but not wrapped in `Row`.

commit 9d372677372f9beefb715a2b155b81c41437ece5
Author: Chen Mulong <[email protected]>
Date:   Tue Jul 12 21:32:23 2016 +0800

    Some locks for Table::m_views are missed (#1958)

    This might lead to some java crashes (eg.: Crashing in Group closing
    detath_table_accessors) since java needs to free TableView in the GC
    thread and creating TableView in main thread without locks for creating.

commit a7d24461b2d3bd99f1e89627466e98fc4f3a2969
Merge: a38f2d6 02b11e6
Author: James Stone <[email protected]>
Date:   Mon Jul 11 10:29:47 2016 +0200

    Merge pull request #1957 from realm/js/valgrind-test

    Increase verbosity of exceptions.

commit 02b11e6063ba8d4c4c113c146e1d68e93a771fde
Author: James Stone <[email protected]>
Date:   Fri Jul 8 17:17:23 2016 +0200

    Add release notes.

commit a38f2d69da4c300b116753cd5a8f7dafc0811ad0
Merge: 5b9e560 9a3779b
Author: James Stone <[email protected]>
Date:   Fri Jul 8 17:12:45 2016 +0200

    Merge pull request #1909 from realm/js/warn-shadow

    Turn on then fix warnings for shadowed variables

commit 9a3779beb803794b05be94be6189a6bbfcfd511e
Author: James Stone <[email protected]>
Date:   Fri Jul 8 15:12:22 2016 +0200

    Should not use string as a variable name.

commit 3c01c4e3c58465c440c6a979653069896b46e5c6
Author: James Stone <[email protected]>
Date:   Fri Jul 8 14:32:04 2016 +0200

    Increase verbosity of exceptions.

commit 93c3c37bf58a9e1a53143903178a19fae3bd83e6
Author: Yavor Georgiev <[email protected]>
Date:   Thu Jul 7 16:10:10 2016 +0200

    simulated_failure shouldn't use thread_local on Android

    Fixes https://github.com/realm/realm-dotnet/issues/582

    This causes a crash in the unit tests of the dotnet binding. Apparently `thread_local` causes issues on Android.

commit 5b9e560bd6ed26d3b3472eb80b471e6acab2a236
Merge: 420d9e4 476d92f
Author: James Stone <[email protected]>
Date:   Thu Jul 7 15:33:45 2016 +0200

    Merge pull request #1889 from realm/js/doxy-encoding

    Change Doxygen encoding.

commit 420d9e4ffd8d65380d96c2aca606e9386cde9cf9
Merge: 1b91330 bd182aa
Author: James Stone <[email protected]>
Date:   Thu Jul 7 15:32:50 2016 +0200

    Merge pull request #1924 from realm/js/insert-rows-logic

    Throw a logic error if attempting to insert rows into a table with no columns.

commit 1b91330e77d9b609dcc77154ec70d6fa9c5fe894
Author: Emanuele Zattin <[email protected]>
Date:   Thu Jul 7 15:26:19 2016 +0200

    Updated release notes

commit bd182aa845fedfa3bbd982b600a7f44423eb429e
Author: James Stone <[email protected]>
Date:   Thu Jul 7 14:47:06 2016 +0200

    Missed this one conversion to CHECK_LOGIC_ERROR.

commit 060d0887c5cb38cb1c0354552359a5b0b00a68d9
Merge: 090fe7f 45c1362
Author: James Stone <[email protected]>
Date:   Thu Jul 7 14:37:02 2016 +0200

    Merge pull request #1951 from realm/js/rc-1.3.0

    Bump version for 1.3.0

commit d47d0c9c22b69e6122eacf09fb8c8025b4b27479
Author: James Stone <[email protected]>
Date:   Thu Jul 7 14:36:26 2016 +0200

    Prefer CHECK_LOGIC_ERROR when possible.

commit 45c13626b7c16d912f822f7e85afee4d6eaaefd7
Author: James Stone <[email protected]>
Date:   Thu Jul 7 14:13:40 2016 +0200

    Improve release notes.

commit bf9660016f89b5156bfe11009d9e77cf9fcf0408
Author: James Stone <[email protected]>
Date:   Thu Jul 7 12:29:17 2016 +0200

    Bump version for 1.3.0.

commit 090fe7f0539adf8335cff6a7dd6f391d5ff8a81d
Merge: c271520 8e590a8
Author: James Stone <[email protected]>
Date:   Thu Jul 7 12:19:44 2016 +0200

    Merge pull request #1947 from realm/js/sorting-order

    Use old-style ordering by default

commit 8e590a83ca1a05273793796a1aea1df8481311ac
Author: Lasse Reinhold <[email protected]>
Date:   Wed Jul 6 14:49:51 2016 +0200

    Added unit test. Also moved a variable declaration

commit 16f8af657fed640e2f11725d510a45cfa491f274
Author: James Stone <[email protected]>
Date:   Tue Jul 5 16:01:01 2016 +0200

    Review feedback update.

commit 6f33718f791182621270cd8c9e0fd190b65076cd
Author: James Stone <[email protected]>
Date:   Tue Jul 5 14:41:12 2016 +0200

    Update release notes.

commit 16e6f15b036d262fb8a4f2d903a7fca83013458d
Author: James Stone <[email protected]>
Date:   Tue Jul 5 14:37:36 2016 +0200

    Default to old sort, opt-in to new (similar) sort.

commit c271520af3741f176d436650f275418448228b12
Merge: aff3d21 d845c40
Author: Lasse Reinhold <[email protected]>
Date:   Mon Jul 4 13:41:27 2016 +0200

    Merge pull request #1942 from realm/lr/windows_bug

    On Windows we could erroneously throw a "SetEndOfFile() failed" excep…

commit 99500af7c4cb7fc6bb4d6173e7fb3efb2be524eb
Merge: b531d18 aff3d21
Author: James Stone <[email protected]>
Date:   Fri Jul 1 17:15:44 2016 +0200

    Merge branch 'master' into js/warn-shadow

commit aff3d21569ef2537a188382a736666638fbf4ff4
Merge: fc972a9 9b153bd
Author: James Stone <[email protected]>
Date:   Fri Jul 1 17:11:11 2016 +0200

    Merge pull request #1902 from realm/js/warn-old-style-cast

    Add warning for old style cast

commit fc972a9efce18019327fa7b7d8d078fd156851a1
Merge: 21038f5 87a509c
Author: Daniel Povlsen <[email protected]>
Date:   Fri Jul 1 16:13:21 2016 +0200

    Merge pull request #1791 from realm/dp/afl-improvements

    AFL Improvements

commit 9b153bdad3d3444a6ce2a7701fa3bf7c743d478b
Merge: eb825cd 21038f5
Author: James Stone <[email protected]>
Date:   Fri Jul 1 15:44:00 2016 +0200

    Merge branch 'master' into js/warn-old-style-cast

commit 21038f55cd965bd2e6073df010159047b3c7f2f6
Merge: cfea700 35d8d47
Author: James Stone <[email protected]>
Date:   Fri Jul 1 15:36:43 2016 +0200

    Merge pull request #1917 from realm/js/upgrade-jsmn

    Update the jsmn code to the latest version.

commit d845c40e41bc8181dbdcff9b63385cd402851b41
Author: Lasse Reinhold <[email protected]>
Date:   Fri Jul 1 15:34:45 2016 +0200

    On Windows we could erroneously throw a "SetEndOfFile() failed" exception when opening a file through the SharedGroup constructor. This was due to unlocking the .lock file before unmapping it. This order has now changed.

commit cfea70077c6a04dd615a985b8adefc0263db8cb2
Merge: 7236fc8 b23e2b7
Author: Finn Schiermer Andersen <[email protected]>
Date:   Fri Jul 1 15:34:17 2016 +0200

    Merge pull request #1933 from realm/mar/linklist-accessor

    Have LinkListColumn::get_ptr do a better job of reusing tombstone entries in its cached accessor vector

commit 7236fc860a64dff66add6979218f790c2ae9df3e
Merge: bcd356b 62a53a8
Author: Finn Schiermer Andersen <[email protected]>
Date:   Fri Jul 1 14:38:20 2016 +0200

    Merge pull request #1939 from realm/tg/move-table-crash

    Fix a crash when Group::move_table() is called before table accessors are initialized

commit bcd356b3b313de750fb9d7735408788a9f8f9900
Merge: 8fa5ce8 72f7287
Author: Daniel Povlsen <[email protected]>
Date:   Fri Jul 1 13:44:37 2016 +0200

    Merge pull request #1937 from realm/dp/misc_fixes

    Misc fixes

commit 35d8d47297fd35606556d3c535fc0e8d7feec5b4
Author: James Stone <[email protected]>
Date:   Fri Jul 1 13:43:05 2016 +0200

    Spaces not tabs.

commit b23e2b7589ea23acf9a354b75dd053b02d7bbd3b
Author: Finn Schiermer Andersen <[email protected]>
Date:   Fri Jul 1 12:43:04 2016 +0200

    release note

commit b531d18f0fa45af4711bd6618e8fbb1e556dee2d
Merge: 325e8c8 8fa5ce8
Author: James Stone <[email protected]>
Date:   Fri Jul 1 11:57:04 2016 +0200

    Merge branch 'master' into js/warn-shadow

commit 62a53a8cdd635ab48d94fed160651089fdc3052a
Author: Thomas Goyne <[email protected]>
Date:   Thu Jun 30 11:33:49 2016 -0700

    Fix a crash when Group::move_table() is called before table accessors are initialized

commit 87a509c01d250f1ab811e2e5acb60aa638bd69c6
Author: Daniel Povlsen <[email protected]>
Date:   Thu Jun 30 17:14:29 2016 +0200

    Changed setup of encryption key slightly to explicitly disregard UNITTEST_ENCRYPT_ALL, while still respecting REALM_ENABLE_ENCRYPTION

commit ab1784b536c48272365af50d6e53e44091d3d76e
Author: Daniel Povlsen <[email protected]>
Date:   Thu Jun 30 16:45:40 2016 +0200

    No need to redirect

commit 1f025dd9a44bd6a4598588e350b11c462359d97e
Author: Daniel Povlsen <[email protected]>
Date:   Thu Jun 30 16:42:41 2016 +0200

    Forgot a few quotes

commit 72f7287cd2092abc0016b63e12586ac2840d4a3d
Author: Daniel Povlsen <[email protected]>
Date:   Thu Jun 30 16:01:42 2016 +0200

    Changed a few std::size_t to size_t for consistency.

commit b2932b27215aadc5175caed1f7d5d043ba20eb79
Author: Daniel Povlsen <[email protected]>
Date:   Thu Jun 30 14:29:03 2016 +0200

    Destroy the column at the end of the test to satisfy Valgrind.

commit 1c2cda60a6e915723e8ca448d800123576226973
Author: Daniel Povlsen <[email protected]>
Date:   Thu Jun 30 14:14:08 2016 +0200

    Added test_util_event_loop.cpp, test_util_logger.cpp, test_util_scope_exit.cpp to the Xcode project and its unit test targets.

commit 55a8c90c547505c618649ebfa29f341afe14ebbf
Author: Daniel Povlsen <[email protected]>
Date:   Thu Jun 30 14:11:27 2016 +0200

    Sorting files in the Xcode project.

commit 5e65c759793348f693ce360ffb6f4ab7489f9e98
Author: Daniel Povlsen <[email protected]>
Date:   Thu Jun 30 13:58:16 2016 +0200

    Removed CHECK_THROW_WHAT and a few other equality checks around exceptions' what() messages. The messages themselves should not be considered part of the API. The exact wording should not be relied on and as such we do not want to give that impression by doing it in tests.

commit aca5c6b14be65a7f164113a55dd8f33bec87c3a1
Author: Daniel Povlsen <[email protected]>
Date:   Thu Jun 30 13:50:06 2016 +0200

    Use void* directly and avoid cast.

commit 8fa5ce8a9f59c9cc553282510da11a88c63db5e7
Author: Kenneth Geisshirt <[email protected]>
Date:   Thu Jun 30 10:54:30 2016 +0200

    Switching to -Os to compile OpenSSL on Android. It has been reported by other (#1930)

    projects that -O3 might produce wrong code (https://github.com/android-ndk/ndk/issues/110).

commit 70a94eaaeca47e86740a581c64edc816b7993b75
Author: Mark Rowe <[email protected]>
Date:   Wed Jun 29 16:33:35 2016 -0700

    Have `LinkListColumn::get_ptr` do a better job of reusing tombstone
    entries in its cached accessor list.

    `LinkListColumn` stores a vector of accessors sorted by their row index.
    When an accessor is destroyed, its entry in the vector becomes a
    tombstone, represented by an expired `m_list` `weak_ptr`.
    `LinkListColumn::get_ptr` can reuse these tombstone entries rather than
    inserting new entries into `m_list_accessors` when doing so would
    preserve the correct order. This is the case when one of the entries
    adjacent to where the new entry would be inserted is a
    tombstone. Reusing the entry avoids repeatedly growing the accessor
    vector in many common scenarios that involve short-lived link list
    accessors, improving performance.

commit 62613387ea83db3ae1c818be1bac503449dcb056
Author: Emanuele Zattin <[email protected]>
Date:   Wed Jun 29 16:33:00 2016 +0200

    Updated release notes

commit 7b88a6f4a1b0135cab2f4a36173f5d43cc29ff9b
Author: Daniel Povlsen <[email protected]>
Date:   Wed Jun 29 14:54:42 2016 +0200

    Forgot to add the local variable to hold active TableViews

commit 6d7074c5a1b7b8118347cfc17eb8f1bb4ea0d76f
Author: Daniel Povlsen <[email protected]>
Date:   Thu Jun 23 14:14:06 2016 +0200

    Changed the two step minimization, convertion to cpp into a single loop to get immediate results

commit 081581fd601dab6167c6aea24ff1374004fb1881
Author: Daniel Povlsen <[email protected]>
Date:   Thu Jun 23 13:35:02 2016 +0200

    Increased the timeout for minimization

commit a4b343c68599a5f729e4b2d39e91fc139b122eb5
Author: Daniel Povlsen <[email protected]>
Date:   Fri Jun 17 15:20:47 2016 +0200

    Prevent inserting and adding rows to a table with no columns.

commit 7c92c6ec4b73defdb98bcb0f0257409fd58f5ce0
Author: Daniel Povlsen <[email protected]>
Date:   Fri Jun 17 15:12:56 2016 +0200

    Made the encryption key a variable such that it can easily be changed to nullptr for testing.

commit 8de2afff37037768c529a9b571d39f89371853e9
Author: Daniel Povlsen <[email protected]>
Date:   Thu Jun 16 15:26:54 2016 +0200

    Added compact instruction.

commit 2580ef9ff9092c01dd186ed3f8dcd04caecde3a7
Author: Daniel Povlsen <[email protected]>
Date:   Wed Jun 8 15:52:19 2016 +0200

    Remove previously minimized cases before running minimizer again

commit 5529a7aa84c153bef20392ec8c255cb10dbfc887
Author: Daniel Povlsen <[email protected]>
Date:   Wed Jun 8 15:45:19 2016 +0200

    Upped timeout to 1s to try to avoid false hangs

commit a54f54411ccc7f81fbe0160a1804923a0a228866
Author: Daniel Povlsen <[email protected]>
Date:   Wed Jun 8 14:46:20 2016 +0200

    Enable the script to be terminated with ctrl+c.

commit 445e38d60d03591da5b1c2dfb9b053e9acecf2a3
Author: Daniel Povlsen <[email protected]>
Date:   Wed Jun 8 14:46:02 2016 +0200

    Whitespace fix

commit b7125da3f509c268756c70593d83a921156da662
Author: Daniel Povlsen <[email protected]>
Date:   Wed Jun 8 13:33:50 2016 +0200

    AFL is now given same arguments across start / stop scripts.

commit 0f824817ba44e461c2a2d3c78a722fccf5865ab5
Author: Daniel Povlsen <[email protected]>
Date:   Wed Jun 8 13:30:44 2016 +0200

    Slightly better comments

commit b8039bea6fb8d1dc5102b383b63520d16b001db9
Author: Daniel Povlsen <[email protected]>
Date:   Wed Jun 8 13:30:29 2016 +0200

    Fixed a typo that excluded all hangs from the post process / conversion.

commit 3366a187dcc8479823551623124bb7bd622c1780
Author: Daniel Povlsen <[email protected]>
Date:   Tue Jun 7 15:01:44 2016 +0200

    Added step for minimizing the found crashes, hangs before converting to .cpp.

commit d87839dd3e5dce9c62606149fa3801571e40a14a
Author: Daniel Povlsen <[email protected]>
Date:   Tue Jun 7 14:46:37 2016 +0200

    set_bool() now uses the boolean literals instead of 0 and 1.

commit 22ce94e7eda21c8c9543146c00d14cfe2df625a9
Author: Daniel Povlsen <[email protected]>
Date:   Tue Jun 7 14:45:24 2016 +0200

    Changed the usage output to look more like UNIX tools.

commit b3047060da44f2c02bc8cdc0c3a7030976476029
Author: Daniel Povlsen <[email protected]>
Date:   Tue Jun 7 11:45:14 2016 +0200

    Removed OldDateTime from fuzz testing to spend cycles better

commit 38ca36d444deaf2fd142ce999a10b5794c0d7ca7
Author: Daniel Povlsen <[email protected]>
Date:   Thu May 19 09:27:15 2016 +0200

    Initial work on creating and testing TableViews

commit 6ae3a1e283e076edf948b628f6f2c9bc498aa75e
Author: Daniel Povlsen <[email protected]>
Date:   Wed May 18 17:12:46 2016 +0200

    Always build fuzz targets with encryption enabled, but "fuzz" if it is used for the test or not.

commit 7591dc3aae023ae7632a36801fcd2d55f9efc781
Author: Daniel Povlsen <[email protected]>
Date:   Wed May 18 16:33:38 2016 +0200

    Added fuzz instruction to search specifically for core issue #1769.

commit 942b2054b7b73ac1f8c35359c8cded730f333303
Author: Daniel Povlsen <[email protected]>
Date:   Wed May 18 16:24:24 2016 +0200

    Created two specialised functions for generating table and column names and using these in the fuzzer. Also made them go to the maximum length of 63, by doing the correct modulo on the randomised length (63 +1).

commit 6352c92eb91b41b6…
Inventor1937 pushed a commit to Inventor1937/android_external_jpeg that referenced this issue Sep 20, 2016
In the AArch64 ABI, the high (unused) DWORD of a 32-bit argument's
register is undefined, so it was incorrect to use 64-bit instructions
to transfer a JDIMENSION argument in the 64-bit NEON SIMD functions.
The code worked thus far only because the existing compiler optimizers
weren't smart enough to do anything else with the register in question,
so the upper 32 bits happened to be all zeroes.

The latest builds of Clang/LLVM have a smarter optimizer, and under
certain circumstances, it will attempt to load-combine adjacent 32-bit
integers from one of the libjpeg structures into a single 64-bit integer
and pass that 64-bit integer as a 32-bit argument to one of the SIMD
functions (which is allowed by the ABI, since the upper 32 bits of the
32-bit argument's register are undefined.)  This caused the
libjpeg-turbo regression tests to crash.

This patch tries to use the Wn registers whenever possible.  Otherwise,
it uses a zero-extend instruction to avoid using the upper 32 bits of
the 64-bit registers, which are not guaranteed to be valid for 32-bit
arguments.

Based on sebpop@1fbae13

Closes #91.  Refer also to android/ndk#110 and
https://llvm.org/bugs/show_bug.cgi?id=28393

(cherrypick from external/libjpeg-turbo of c8282be605a139b269f2b8f4b4fb6f4118e740ab.)

Change-Id: I935a3696106e7ffcf9b1a6c12cb7f31d95b4ccc8
B--B pushed a commit to AOSP-JF-MM/platform_external_libjpeg-turbo that referenced this issue May 25, 2017
In the AArch64 ABI, the high (unused) DWORD of a 32-bit argument's
register is undefined, so it was incorrect to use 64-bit
instructions to transfer a JDIMENSION argument in the 64-bit NEON SIMD
functions.  The code worked thus far only because the existing compiler
optimizers weren't smart enough to do anything else with the register in
question, so the upper 32 bits happened to be all zeroes.

The latest builds of Clang/LLVM have a smarter optimizer, and under
certain circumstances, it will attempt to load-combine adjacent 32-bit
integers from one of the libjpeg structures into a single 64-bit integer
and pass that 64-bit integer as a 32-bit argument to one of the SIMD
functions (which is allowed by the ABI, since the upper 32 bits of the
32-bit argument's register are undefined.)  This caused the
libjpeg-turbo regression tests to crash.

This patch tries to use the Wn registers whenever possible.  Otherwise,
it uses a zero-extend instruction to avoid using the upper 32 bits of
the 64-bit registers, which are not guaranteed to be valid for 32-bit
arguments.

Based on sebpop@1fbae13

Closes #91.  Refer also to android/ndk#110 and
https://llvm.org/bugs/show_bug.cgi?id=28393

BUG:31780857

Change-Id: Id80143ac13ba8d427196daf04f00be2214f85c86
xlxfoxxlx pushed a commit to kronic-staging/platform_external_libjpeg-turbo that referenced this issue Jul 9, 2017
In the AArch64 ABI, the high (unused) DWORD of a 32-bit argument's
register is undefined, so it was incorrect to use 64-bit
instructions to transfer a JDIMENSION argument in the 64-bit NEON SIMD
functions.  The code worked thus far only because the existing compiler
optimizers weren't smart enough to do anything else with the register in
question, so the upper 32 bits happened to be all zeroes.

The latest builds of Clang/LLVM have a smarter optimizer, and under
certain circumstances, it will attempt to load-combine adjacent 32-bit
integers from one of the libjpeg structures into a single 64-bit integer
and pass that 64-bit integer as a 32-bit argument to one of the SIMD
functions (which is allowed by the ABI, since the upper 32 bits of the
32-bit argument's register are undefined.)  This caused the
libjpeg-turbo regression tests to crash.

This patch tries to use the Wn registers whenever possible.  Otherwise,
it uses a zero-extend instruction to avoid using the upper 32 bits of
the 64-bit registers, which are not guaranteed to be valid for 32-bit
arguments.

Based on sebpop@1fbae13

Closes #91.  Refer also to android/ndk#110 and
https://llvm.org/bugs/show_bug.cgi?id=28393

BUG:31780857

Change-Id: Id80143ac13ba8d427196daf04f00be2214f85c86
mydongistiny pushed a commit to BenzoRoms/external_libjpeg-turbo that referenced this issue Aug 27, 2017
In the AArch64 ABI, the high (unused) DWORD of a 32-bit argument's
register is undefined, so it was incorrect to use 64-bit
instructions to transfer a JDIMENSION argument in the 64-bit NEON SIMD
functions.  The code worked thus far only because the existing compiler
optimizers weren't smart enough to do anything else with the register in
question, so the upper 32 bits happened to be all zeroes.

The latest builds of Clang/LLVM have a smarter optimizer, and under
certain circumstances, it will attempt to load-combine adjacent 32-bit
integers from one of the libjpeg structures into a single 64-bit integer
and pass that 64-bit integer as a 32-bit argument to one of the SIMD
functions (which is allowed by the ABI, since the upper 32 bits of the
32-bit argument's register are undefined.)  This caused the
libjpeg-turbo regression tests to crash.

This patch tries to use the Wn registers whenever possible.  Otherwise,
it uses a zero-extend instruction to avoid using the upper 32 bits of
the 64-bit registers, which are not guaranteed to be valid for 32-bit
arguments.

Based on sebpop@1fbae13

Closes #91.  Refer also to android/ndk#110 and
https://llvm.org/bugs/show_bug.cgi?id=28393

Change-Id: Id80143ac13ba8d427196daf04f00be2214f85c86
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants