Page MenuHomePhabricator

dim (Dimitry Andric)
User

Projects

User does not belong to any projects.

User Details

User Since
Apr 15 2014, 12:19 PM (279 w, 3 d)

Recent Activity

Yesterday

dim accepted D66582: [Sanitizer] checks ASLR on FreeBSD.

LGTM. Maybe nice to merge it to 9.0 after a day or two.

Thu, Aug 22, 10:50 AM · Restricted Project, Restricted Project

Sat, Aug 10

dim committed rGc09d88863284: Add support for FreeBSD's LD_32_LIBRARY_PATH (authored by dim).
Add support for FreeBSD's LD_32_LIBRARY_PATH
Sat, Aug 10, 12:08 PM
dim committed rL368516: Add support for FreeBSD's LD_32_LIBRARY_PATH.
Add support for FreeBSD's LD_32_LIBRARY_PATH
Sat, Aug 10, 12:07 PM
dim closed D65772: Add support for FreeBSD's LD_32_LIBRARY_PATH.
Sat, Aug 10, 12:07 PM · Restricted Project, Restricted Project

Mon, Aug 5

dim created D65772: Add support for FreeBSD's LD_32_LIBRARY_PATH.
Mon, Aug 5, 1:21 PM · Restricted Project, Restricted Project

Sun, Jul 28

dim added inline comments to D65221: [Sanitizer][ASAN][MSAN] Fix infinite recursion on FreeBSD.
Sun, Jul 28, 3:00 AM · Restricted Project, Restricted Project

Wed, Jul 24

dim added a comment to D65221: [Sanitizer][ASAN][MSAN] Fix infinite recursion on FreeBSD.

Is any test was broken?

Wed, Jul 24, 11:11 PM · Restricted Project, Restricted Project

Jul 24 2019

dim added a comment to D55596: Reimplement Thread Static Data ASan routines with TLS.
In D55596#1599456, @dim wrote:

This broke ASAN on FreeBSD (same for the MSAN change). When loading static thread_local struct tsd_key key this is done using __tls_get_addr. The interceptor for __tls_get_addr then calls GetCurrentThread which calls AsanTSDGet which again calls __tls_get_addr.
If I remove the || SANITIZER_FREEBSD it works fine (at least on FreeBSD 11.2).

Yes indeed, this is https://bugs.llvm.org/show_bug.cgi?id=40761. I'm unsure what a good solution direction is.

I just spent some time debugging and it seems like https://reviews.llvm.org/D55596 works.

Jul 24 2019, 10:51 AM · Restricted Project, Restricted Project
dim added a comment to D55596: Reimplement Thread Static Data ASan routines with TLS.

This broke ASAN on FreeBSD (same for the MSAN change). When loading static thread_local struct tsd_key key this is done using __tls_get_addr. The interceptor for __tls_get_addr then calls GetCurrentThread which calls AsanTSDGet which again calls __tls_get_addr.
If I remove the || SANITIZER_FREEBSD it works fine (at least on FreeBSD 11.2).

Jul 24 2019, 9:51 AM · Restricted Project, Restricted Project

Jul 9 2019

dim committed rG19a71f6bdf2d: Merging r360861, with an additional change to also add the PPC64_OPD1 and… (authored by dim).
Merging r360861, with an additional change to also add the PPC64_OPD1 and…
Jul 9 2019, 12:26 PM
dim committed rL365542: Merging r360861, with an additional change to also add the PPC64_OPD1.
Merging r360861, with an additional change to also add the PPC64_OPD1
Jul 9 2019, 12:25 PM
dim committed rG635f8ffdbd7b: Revert merge of r360861: (authored by dim).
Revert merge of r360861:
Jul 9 2019, 12:18 PM
dim committed rL365539: Revert merge of r360861:.
Revert merge of r360861:
Jul 9 2019, 12:18 PM

Jun 23 2019

dim added a comment to D63686: [LFTR] Fix post-inc pointer IV with truncated exit count (PR41998).

FWIW, the original test case with pre-increment is fixed by this, e.g.:

Jun 23 2019, 2:23 PM · Restricted Project

Jun 15 2019

dim abandoned D62873: Avoid building analyzer plugins if CLANG_ENABLE_STATIC_ANALYZER is OFF.

No longer needed after rC362328 and follow-ups.

Jun 15 2019, 2:07 PM · Restricted Project

Jun 4 2019

dim created D62873: Avoid building analyzer plugins if CLANG_ENABLE_STATIC_ANALYZER is OFF.
Jun 4 2019, 12:48 PM · Restricted Project

May 13 2019

dim added a comment to D60748: Fix i386 struct and union parameter alignment.

In fact, it is probably better to turn the OS check around, e.g. *only* increase the alignment for Linux, and nowhere else.

May 13 2019, 4:01 AM · Restricted Project
dim updated subscribers of D60748: Fix i386 struct and union parameter alignment.

Please also exclude FreeBSD from these changes, since we care a lot about backwards compatibility, and specifically about alignment requirements. (We have run into many issues in our ports collection where upstream assumes everything is 16-byte aligned on i386, which is *NOT* ABI compliant.)

May 13 2019, 3:57 AM · Restricted Project

May 6 2019

dim added a comment to D60427: [ARM] Glue register copies to tail calls..

@efriedma any more work to be done on this? :)

May 6 2019, 11:07 AM · Restricted Project
dim committed rG181aff63fb14: Add non-SSE wrapper for __kmp_{load,store}_mxcsr (authored by dim).
Add non-SSE wrapper for __kmp_{load,store}_mxcsr
May 6 2019, 10:58 AM
dim committed rL360062: Add non-SSE wrapper for __kmp_{load,store}_mxcsr.
Add non-SSE wrapper for __kmp_{load,store}_mxcsr
May 6 2019, 10:58 AM
dim committed rOMP360062: Add non-SSE wrapper for __kmp_{load,store}_mxcsr.
Add non-SSE wrapper for __kmp_{load,store}_mxcsr
May 6 2019, 10:58 AM
dim closed D60916: Add non-SSE wrapper for __kmp_{load,store}_mxcsr.
May 6 2019, 10:57 AM · Restricted Project

May 4 2019

dim added a comment to D60916: Add non-SSE wrapper for __kmp_{load,store}_mxcsr.

So does this look better now?

May 4 2019, 5:58 AM · Restricted Project

May 1 2019

dim updated the diff for D60916: Add non-SSE wrapper for __kmp_{load,store}_mxcsr.

Address review comments:

  • Assign zero to pointed-to value in __kmp_store_mxcsr()
  • Use SSE specific stuff in KMP_OS_UNIX part only
May 1 2019, 12:53 PM · Restricted Project
dim committed rG147ce2334c96: Enable OpenMP build for 32-bit FreeBSD (authored by dim).
Enable OpenMP build for 32-bit FreeBSD
May 1 2019, 12:33 PM
dim committed rL359716: Enable OpenMP build for 32-bit FreeBSD.
Enable OpenMP build for 32-bit FreeBSD
May 1 2019, 12:32 PM
dim committed rOMP359716: Enable OpenMP build for 32-bit FreeBSD.
Enable OpenMP build for 32-bit FreeBSD
May 1 2019, 12:32 PM
dim closed D60917: Enable OpenMP build for 32-bit FreeBSD.
May 1 2019, 12:32 PM · Restricted Project
dim added a comment to D60916: Add non-SSE wrapper for __kmp_{load,store}_mxcsr.

Does the code that uses __kmp_load_mxcsr expect the pointed-to value to be initialized?

May 1 2019, 6:54 AM · Restricted Project
dim added a comment to D60916: Add non-SSE wrapper for __kmp_{load,store}_mxcsr.

Ping :)

May 1 2019, 4:09 AM · Restricted Project

Apr 22 2019

dim committed rG87e7f895bb2c: Use correct way to test for MIPS arch after rOMP355687 (authored by dim).
Use correct way to test for MIPS arch after rOMP355687
Apr 22 2019, 12:21 PM
dim committed rL358911: Use correct way to test for MIPS arch after rOMP355687.
Use correct way to test for MIPS arch after rOMP355687
Apr 22 2019, 12:19 PM
dim committed rOMP358911: Use correct way to test for MIPS arch after rOMP355687.
Use correct way to test for MIPS arch after rOMP355687
Apr 22 2019, 12:18 PM
dim closed D60938: Use correct way to test for MIPS arch after rOMP355687.
Apr 22 2019, 12:18 PM · Restricted Project

Apr 20 2019

dim created D60938: Use correct way to test for MIPS arch after rOMP355687.
Apr 20 2019, 1:00 PM · Restricted Project

Apr 19 2019

dim created D60917: Enable OpenMP build for 32-bit FreeBSD.
Apr 19 2019, 1:34 PM · Restricted Project
dim created D60916: Add non-SSE wrapper for __kmp_{load,store}_mxcsr.
Apr 19 2019, 1:28 PM · Restricted Project

Apr 9 2019

dim added a comment to D60427: [ARM] Glue register copies to tail calls..

I can confirm this fixes both the minimized test case from https://bugs.llvm.org/show_bug.cgi?id=41417, and the full original test case from https://bugs.freebsd.org/237074.

Apr 9 2019, 2:15 PM · Restricted Project

Apr 5 2019

dim committed rG8f2d1eb9e887: After rL357618, quote ${CMAKE_THREAD_LIBS_INIT} so CMake does not complain when… (authored by dim).
After rL357618, quote ${CMAKE_THREAD_LIBS_INIT} so CMake does not complain when…
Apr 5 2019, 3:19 PM
dim committed rOMP357828: After rL357618, quote ${CMAKE_THREAD_LIBS_INIT} so CMake does not.
After rL357618, quote ${CMAKE_THREAD_LIBS_INIT} so CMake does not
Apr 5 2019, 3:19 PM
dim committed rL357828: After rL357618, quote ${CMAKE_THREAD_LIBS_INIT} so CMake does not.
After rL357618, quote ${CMAKE_THREAD_LIBS_INIT} so CMake does not
Apr 5 2019, 3:19 PM

Apr 3 2019

dim committed rOMP357618: Ensure correct pthread flags and libraries are used.
Ensure correct pthread flags and libraries are used
Apr 3 2019, 11:54 AM
dim committed rG956168c8029b: Ensure correct pthread flags and libraries are used (authored by dim).
Ensure correct pthread flags and libraries are used
Apr 3 2019, 11:14 AM
dim committed rL357618: Ensure correct pthread flags and libraries are used.
Ensure correct pthread flags and libraries are used
Apr 3 2019, 11:10 AM
dim closed D59451: Fix gettid warnings and one test on FreeBSD.
Apr 3 2019, 11:10 AM · Restricted Project, Restricted Project

Apr 2 2019

dim updated the diff for D59451: Fix gettid warnings and one test on FreeBSD.
  • Only set OPENMP_TEST_COMPILER_OPENMP_FLAGS once.
  • For standalone builds, call find_package(Threads) and use the result unconditionally.
  • Fix else -> else().
Apr 2 2019, 12:34 PM · Restricted Project, Restricted Project

Apr 1 2019

dim added a comment to D59451: Fix gettid warnings and one test on FreeBSD.

So, any thoughts on the current state of the review?

Apr 1 2019, 10:41 AM · Restricted Project, Restricted Project

Mar 25 2019

dim committed rGa70da7f29f9d: Fix interoperability test compilation on FreeBSD (authored by dim).
Fix interoperability test compilation on FreeBSD
Mar 25 2019, 11:37 AM
dim committed rGdab9ed87c6c5: Fix gettid warnings on FreeBSD (authored by dim).
Fix gettid warnings on FreeBSD
Mar 25 2019, 11:37 AM
dim committed rL356936: Fix interoperability test compilation on FreeBSD.
Fix interoperability test compilation on FreeBSD
Mar 25 2019, 11:37 AM
dim committed rOMP356936: Fix interoperability test compilation on FreeBSD.
Fix interoperability test compilation on FreeBSD
Mar 25 2019, 11:37 AM
dim closed D59736: Fix interoperability test compilation on FreeBSD.
Mar 25 2019, 11:36 AM · Restricted Project
dim committed rL356934: Fix gettid warnings on FreeBSD.
Fix gettid warnings on FreeBSD
Mar 25 2019, 11:36 AM
dim committed rOMP356934: Fix gettid warnings on FreeBSD.
Fix gettid warnings on FreeBSD
Mar 25 2019, 11:36 AM
dim closed D59735: Fix gettid warnings on FreeBSD.
Mar 25 2019, 11:36 AM · Restricted Project

Mar 24 2019

dim updated the diff for D59451: Fix gettid warnings and one test on FreeBSD.
  • Use CMAKE_THREAD_LIBS_INIT verbatim, if it is not "-lpthread".
  • Add similar logic to DetectTestCompiler for standalone build.
Mar 24 2019, 11:56 AM · Restricted Project, Restricted Project
dim updated the diff for D59451: Fix gettid warnings and one test on FreeBSD.

Readdress the issue in a different way: add -pthread in the
OpenMPTesting.cmake file instead. The top-level LLVM config-ix.cmake file
mangles the value of the needed CMAKE_THREAD_LIBS_INIT variable, so derive the
flag from this, instead of directly using it.

Mar 24 2019, 8:01 AM · Restricted Project, Restricted Project

Mar 23 2019

dim updated subscribers of D59451: Fix gettid warnings and one test on FreeBSD.

Using CMake's own FindThreads package is obviously the correct solution for finding the right compiler and linker options for enabling threading.

Mar 23 2019, 2:02 PM · Restricted Project, Restricted Project
dim added a comment to D59451: Fix gettid warnings and one test on FreeBSD.

Split off the __kmp_gettid() fix to D59735, the <alloca.h> header fix to D59736. I will rebase this review and update it to add some CMake logic for pthread flag detection.

Mar 23 2019, 7:45 AM · Restricted Project, Restricted Project
dim created D59736: Fix interoperability test compilation on FreeBSD.
Mar 23 2019, 7:44 AM · Restricted Project
dim created D59735: Fix gettid warnings on FreeBSD.
Mar 23 2019, 7:40 AM · Restricted Project

Mar 17 2019

dim added a comment to D59451: Fix gettid warnings and one test on FreeBSD.
it's not with libc++ and newer libstdc++.

Some OSs merged libpthread into libc and/or implemented it almost fully in the kernel. It's not the case on NetBSD and apparently FreeBSD.

In libc there are just stubs for libpthread to allow linking but without defined interfaces, unless someone will link with the POSIX threading library.

Mar 17 2019, 10:56 AM · Restricted Project, Restricted Project
dim added a comment to D59451: Fix gettid warnings and one test on FreeBSD.
In D59451#1432251, @dim wrote:

This code does not directly use pthreads, but uses C++11 threads.
Why does the compiler not link the necessary threading library, when using C++11 threads?

How would the compiler know up-front what is in the code? I have not often seen compilers that influence linking flags from the code that was compiled, unless maybe the Microsoft specific #pragma lib feature (which somebody is now adding to clang, I believe). Usually, these kinds of flags are specified by the user, and passed from the frontend to the linker.

The point is that the test case is using std::thread and the compiler needs to link all libraries that are needed for the stdlib to work. If this includes libpthread that's up to the compiler, so I agree with Joachim that adding linking flags does not seem right.

Mar 17 2019, 4:39 AM · Restricted Project, Restricted Project

Mar 16 2019

dim added a comment to D59451: Fix gettid warnings and one test on FreeBSD.

This code does not directly use pthreads, but uses C++11 threads.
Why does the compiler not link the necessary threading library, when using C++11 threads?

Mar 16 2019, 1:02 PM · Restricted Project, Restricted Project
dim updated the diff for D59451: Fix gettid warnings and one test on FreeBSD.

Update to use -pthread instead.

Mar 16 2019, 8:25 AM · Restricted Project, Restricted Project
dim added a comment to D59451: Fix gettid warnings and one test on FreeBSD.

If we want to depend on pthread, please go for canonical -pthread.

Mar 16 2019, 5:38 AM · Restricted Project, Restricted Project
dim created D59451: Fix gettid warnings and one test on FreeBSD.
Mar 16 2019, 4:53 AM · Restricted Project, Restricted Project

Mar 11 2019

dim added a comment to D59201: [RegAllocHints] Avoid compile time regression.

Btw @jonpa, for me it's still interesting as to why the compiler hang only occurred for builds targeting i386 (i.e 32 bit x86), while x86_64 worked just fine. Is it due to the lower number of physical registers on i386?

Mar 11 2019, 11:10 AM
dim updated subscribers of D59201: [RegAllocHints] Avoid compile time regression.

@hans it's really late but if you're going to spin 8.0.0 rc5, it would be nice if this one gets merged too, after it's been committed. Or if not, I'll probably merge into the FreeBSD version of clang anyway, since we hit this issue first. :)

Mar 11 2019, 9:04 AM
dim added a comment to D59201: [RegAllocHints] Avoid compile time regression.

This helps quite a lot, in the sense that my original test case from PR40986 now at least compiles within a finite time. There is still a performance loss between clang 7.0.1 and clang 8.0.0 with this patch, though (tested with 10 runs each):

Mar 11 2019, 1:43 AM

Mar 6 2019

dim updated subscribers of rL349766: Replace MemoryRegionInfoSP with values and cleanup related code.
Mar 6 2019, 9:54 AM

Feb 27 2019

dim closed D58473: Fix a few swapped _LIBCPP_TEMPLATE_VIS attributes.

Fixed in rCXX355006. (@ldionne it would have been handy to include the "Differential Revision:" line in your commit message, then Phabricator would have picked it up. :)

Feb 27 2019, 1:56 PM

Feb 20 2019

dim committed rCXX354515: Fix the build with gcc when `-Wredundant-decls` is passed.
Fix the build with gcc when `-Wredundant-decls` is passed
Feb 20 2019, 1:19 PM
dim committed rGd95da99b9159: Fix the build with gcc when `-Wredundant-decls` is passed (authored by dim).
Fix the build with gcc when `-Wredundant-decls` is passed
Feb 20 2019, 1:02 PM
dim committed rL354515: Fix the build with gcc when `-Wredundant-decls` is passed.
Fix the build with gcc when `-Wredundant-decls` is passed
Feb 20 2019, 1:01 PM
dim closed D58425: Fix the build with gcc 8.x when `-Wredundant-decls` is passed.
Feb 20 2019, 1:01 PM · Restricted Project, Restricted Project
dim commandeered D58425: Fix the build with gcc 8.x when `-Wredundant-decls` is passed.

I will update and commit.

Feb 20 2019, 12:56 PM · Restricted Project, Restricted Project
dim created D58473: Fix a few swapped _LIBCPP_TEMPLATE_VIS attributes.
Feb 20 2019, 12:48 PM
dim added a comment to D58425: Fix the build with gcc 8.x when `-Wredundant-decls` is passed.

In the case of <__locale>, __throw_runtime_error is already used in the file before its declaration, but via transitive includes, <stdexcept> is also included earlier, so it gets the duplicate declaration of __throw_runtime_error from there. I think we can just delete the __throw_runtime_error declaration from <__locale> altogether.

Feb 20 2019, 4:03 AM · Restricted Project, Restricted Project

Feb 6 2019

dim added inline comments to D57735: [X86] Add FPCW as a register and start using it as an implicit use on floating point instructions..
Feb 6 2019, 12:58 PM · Restricted Project

Feb 5 2019

dim added a comment to D57735: [X86] Add FPCW as a register and start using it as an implicit use on floating point instructions..

For what it's worth, this builds and tests correctly for me, and also appears to solve the test cases from bug 40206.

Feb 5 2019, 2:49 AM · Restricted Project

Jan 29 2019

dim committed rLLD352606: Recognize FreeBSD specific BFD names in OUTPUT_FORMAT.
Recognize FreeBSD specific BFD names in OUTPUT_FORMAT
Jan 29 2019, 10:32 PM
dim committed rL352606: Recognize FreeBSD specific BFD names in OUTPUT_FORMAT.
Recognize FreeBSD specific BFD names in OUTPUT_FORMAT
Jan 29 2019, 10:31 PM
dim closed D57283: Recognize FreeBSD specific BFD names in OUTPUT_FORMAT.
Jan 29 2019, 10:31 PM
dim updated the diff for D57283: Recognize FreeBSD specific BFD names in OUTPUT_FORMAT.

Updated as @ruiu suggested.

Jan 29 2019, 2:03 PM
dim updated the diff for D57283: Recognize FreeBSD specific BFD names in OUTPUT_FORMAT.

Rebased.

Jan 29 2019, 9:41 AM
dim updated the diff for D57283: Recognize FreeBSD specific BFD names in OUTPUT_FORMAT.

Updated to address comments:

  • Replaced tuple with BfdDesc struct
  • Parse -freebsd suffix to determine OSABI
  • Add new case for elf-aarch64 (which used to be elf-aarch64-freebsd)
Jan 29 2019, 3:08 AM

Jan 28 2019

dim added inline comments to D57283: Recognize FreeBSD specific BFD names in OUTPUT_FORMAT.
Jan 28 2019, 4:03 AM

Jan 26 2019

dim created D57283: Recognize FreeBSD specific BFD names in OUTPUT_FORMAT.
Jan 26 2019, 9:07 AM

Jan 25 2019

dim committed rCRT352234: Fix XRayTest link on FreeBSD (and likely NetBSD too).
Fix XRayTest link on FreeBSD (and likely NetBSD too)
Jan 25 2019, 11:36 AM
dim committed rL352234: Fix XRayTest link on FreeBSD (and likely NetBSD too).
Fix XRayTest link on FreeBSD (and likely NetBSD too)
Jan 25 2019, 11:36 AM
dim closed D57181: Fix XRayTest link on FreeBSD (and likely NetBSD too).
Jan 25 2019, 11:36 AM

Jan 24 2019

dim created D57181: Fix XRayTest link on FreeBSD (and likely NetBSD too).
Jan 24 2019, 12:38 PM

Jan 20 2019

dim accepted D56975: [Support] Reimplement getMainExecutable() using sysctl on NetBSD.

I can't vouch for the NetBSD part, but this definitely seems like a good idea to me. I'm unsure if the sysctl is already fixed on the FreeBSD side. @emaste any idea?

Jan 20 2019, 6:07 AM · Restricted Project

Jan 7 2019

dim created D56398: Add new EINTEGRITY errno.
Jan 7 2019, 10:45 AM

Dec 25 2018

dim updated subscribers of rL329339: [X86] Remove some InstRWs for plain store instructions on Sandy Bridge..

I'm not sure yet why, but this revision breaks unrolling of some loops in FreeBSD's lib/msun/ld80/e_powl.c, specifically the one in __polevll here, which gets expanded in two places, one instance with a count of 3:

Dec 25 2018, 5:56 AM

Dec 23 2018

dim committed rCRT350020: Set the default SANITIZER_CXX_ABI library to libc++ for FreeBSD, and.
Set the default SANITIZER_CXX_ABI library to libc++ for FreeBSD, and
Dec 23 2018, 3:54 AM
dim committed rL350020: Set the default SANITIZER_CXX_ABI library to libc++ for FreeBSD, and.
Set the default SANITIZER_CXX_ABI library to libc++ for FreeBSD, and
Dec 23 2018, 3:53 AM

Dec 20 2018

dim accepted D55916: [clang] Replace getOS() == llvm::Triple::*BSD with isOS*BSD() [NFCI].
Dec 20 2018, 4:38 AM