dim (Dimitry Andric)
User

Projects

User does not belong to any projects.

User Details

User Since
Apr 15 2014, 12:19 PM (222 w, 5 d)

Recent Activity

Mon, Jul 2

dim added a comment to D48806: [asan] Fix deadlock issue on FreeBSD, caused by use of .preinit_array in rL325240.
In D48806#1149655, @dim wrote:
In D48806#1149021, @dim wrote:

Sorry for not getting to this one earlier, indeed it fixes the deadlock for me too!

Now the only "big" thing left is the hundreds of:

==41641==AddressSanitizer CHECK failed: /share/dim/src/llvm/trunk/projects/compiler-rt/lib/asan/asan_posix.cc:48 "((0)) == ((pthread_key_create(&tsd_key, destructor)))" (0x0, 0x4e)
`

failures. :-)

I guess it s FreeBSD 11.2 ? Seems his fix working on 10.4, will check on 11.x when I can ... otherwise there is always the thread local solution I threw a while ago. WE might need to come up with another solution anyway @krytarowski reports it is still an issue on NetBSD.

This is on FreeBSD 12-CURRENT, but it could also show the same issue on 11.x.

Mon, Jul 2, 2:37 PM
dim added a comment to D48806: [asan] Fix deadlock issue on FreeBSD, caused by use of .preinit_array in rL325240.
In D48806#1149021, @dim wrote:

Sorry for not getting to this one earlier, indeed it fixes the deadlock for me too!

Now the only "big" thing left is the hundreds of:

==41641==AddressSanitizer CHECK failed: /share/dim/src/llvm/trunk/projects/compiler-rt/lib/asan/asan_posix.cc:48 "((0)) == ((pthread_key_create(&tsd_key, destructor)))" (0x0, 0x4e)
`

failures. :-)

I guess it s FreeBSD 11.2 ? Seems his fix working on 10.4, will check on 11.x when I can ... otherwise there is always the thread local solution I threw a while ago. WE might need to come up with another solution anyway @krytarowski reports it is still an issue on NetBSD.

Mon, Jul 2, 9:35 AM

Sun, Jul 1

dim added a comment to D48806: [asan] Fix deadlock issue on FreeBSD, caused by use of .preinit_array in rL325240.

Sorry for not getting to this one earlier, indeed it fixes the deadlock for me too!

Sun, Jul 1, 2:24 PM

Fri, Jun 29

dim committed rC336008: Request init/fini array on FreeBSD 12 and later.
Request init/fini array on FreeBSD 12 and later
Fri, Jun 29, 12:23 PM
dim committed rL336008: Request init/fini array on FreeBSD 12 and later.
Request init/fini array on FreeBSD 12 and later
Fri, Jun 29, 12:23 PM
dim closed D24867: Request init/fini array on FreeBSD 12 and later.
Fri, Jun 29, 12:22 PM

Jun 15 2018

dim added a comment to rL325240: Add Xray instrumentation support to FreeBSD.

FWIW, after this commit, on FreeBSD 12.0-CURRENT, most (if not all) ASan tests hang in 'urdlck' state. I'm still investigating.

Jun 15 2018, 12:22 PM

Jun 13 2018

dim committed rCRT334659: Disable MSan tests of prlimit on FreeBSD.
Disable MSan tests of prlimit on FreeBSD
Jun 13 2018, 2:42 PM
dim committed rL334659: Disable MSan tests of prlimit on FreeBSD.
Disable MSan tests of prlimit on FreeBSD
Jun 13 2018, 2:42 PM

Jun 9 2018

dim created D47987: Provide only one declaration of __throw_runtime_error.
Jun 9 2018, 2:49 PM

May 14 2018

dim updated subscribers of D46857: [CMake] Detect the compiler runtime and standard library.

Do we still leave the defaults for particular OSes here? I'm asking because for example in FreeBSD, we use libcxxrt, but you *won't* find it in linker output, since our libc++.so is a linker script:

$ clang++ /usr/local/share/cmake/Modules/DummyCXXFile.cxx -###
FreeBSD clang version 6.0.0 (tags/RELEASE_600/final 326565) (based on LLVM 6.0.0)
Target: x86_64-unknown-freebsd11.2
Thread model: posix
InstalledDir: /usr/bin
 "/usr/bin/clang++" "-cc1" "-triple" "x86_64-unknown-freebsd11.2" "-emit-obj" "-mrelax-all" "-disable-free" "-disable-llvm-verifier" "-discard-value-names" "-main-file-name" "DummyCXXFile.cxx" "-mrelocation-model" "static" "-mthread-model" "posix" "-mdisable-fp-elim" "-masm-verbose" "-mconstructor-aliases" "-munwind-tables" "-target-cpu" "x86-64" "-dwarf-column-info" "-debugger-tuning=gdb" "-resource-dir" "/usr/lib/clang/6.0.0" "-internal-isystem" "/usr/include/c++/v1" "-fdeprecated-macro" "-fdebug-compilation-dir" "/home/dim/src/llvm/trunk" "-ferror-limit" "19" "-fmessage-length" "160" "-fobjc-runtime=gnustep" "-fcxx-exceptions" "-fexceptions" "-fdiagnostics-show-option" "-fcolor-diagnostics" "-o" "/tmp/DummyCXXFile-5ffab3.o" "-x" "c++" "/usr/local/share/cmake/Modules/DummyCXXFile.cxx"
 "/usr/bin/ld" "--eh-frame-hdr" "-dynamic-linker" "/libexec/ld-elf.so.1" "--hash-style=both" "--enable-new-dtags" "-o" "a.out" "/usr/lib/crt1.o" "/usr/lib/crti.o" "/usr/lib/crtbegin.o" "-L/usr/lib" "/tmp/DummyCXXFile-5ffab3.o" "-lc++" "-lm" "-lgcc" "--as-needed" "-lgcc_s" "--no-as-needed" "-lc" "-lgcc" "--as-needed" "-lgcc_s" "--no-as-needed" "/usr/lib/crtend.o" "/usr/lib/crtn.o"

E.g., you see -lc++, and our /usr/lib/libc++.so contains:

$ cat /usr/lib/libc++.so
/* $FreeBSD: stable/11/lib/libc++/libc++.ldscript 253917 2013-08-03 16:23:43Z dim $ */
GROUP ( /usr/lib/libc++.so.1 /usr/lib/libcxxrt.so )

So what would check_link_libraries find in this case?

May 14 2018, 4:56 PM

May 13 2018

dim committed rL332197: Follow-up to rL332176 by adding a test case for PR37264..
Follow-up to rL332176 by adding a test case for PR37264.
May 13 2018, 7:36 AM

May 12 2018

dim committed rL332176: Clear converters map after X86 Domain Reassignment to avoid crashes.
Clear converters map after X86 Domain Reassignment to avoid crashes
May 12 2018, 1:03 PM
dim closed D46425: Clear converters map after X86 Domain Reassignment to avoid crashes.
May 12 2018, 1:03 PM
dim added inline comments to rL330269: [x86] Switch EFLAGS copy lowering to use reg-reg form of testing for.
May 12 2018, 12:20 PM
dim added inline comments to D46425: Clear converters map after X86 Domain Reassignment to avoid crashes.
May 12 2018, 12:15 PM
dim updated the diff for D46425: Clear converters map after X86 Domain Reassignment to avoid crashes.

Use DeleteContainerSeconds instead of rolling our own.

May 12 2018, 12:13 PM

May 11 2018

dim added a comment to D46425: Clear converters map after X86 Domain Reassignment to avoid crashes.

Ping.

May 11 2018, 2:19 PM

May 10 2018

dim added a comment to rL326644: Adding Msan support to FreeBSD.

Sorry for reacting rather late to this, but I'm getting:

May 10 2018, 8:53 AM

May 9 2018

dim accepted D46623: Omit PT_NOTE for SHT_NOTE without SHF_ALLOC.

I'm fine with this, and also with committing it into FreeBSD's copy of lld, but I'd like to see the opinion of @ruiu and/or @grimar too. (I take it @espindola is no longer being monitored...)

May 9 2018, 3:44 AM

May 7 2018

dim added a comment to D24867: Request init/fini array on FreeBSD 12 and later.

Brooks, I can commit this if you prefer. Maybe it can go into 6.0.2 still...

May 7 2018, 11:59 AM

May 4 2018

dim created D46425: Clear converters map after X86 Domain Reassignment to avoid crashes.
May 4 2018, 5:26 AM

Apr 25 2018

dim added a comment to D45652: Asan, fix FreeBSD support.

Do we know why pthread_{get,set}specific fails now? And would it make sense to use tls more broadly (not just on FreeBSD)?

Apr 25 2018, 10:31 AM

Apr 12 2018

dim added inline comments to rL329673: [x86] Model the direction flag (DF) separately from the rest of EFLAGS..
Apr 12 2018, 11:32 AM
dim added inline comments to rL329673: [x86] Model the direction flag (DF) separately from the rest of EFLAGS..
Apr 12 2018, 11:29 AM

Apr 11 2018

dim committed rL329827: Document -std= values for different languages.
Document -std= values for different languages
Apr 11 2018, 10:25 AM
dim committed rC329827: Document -std= values for different languages.
Document -std= values for different languages
Apr 11 2018, 10:25 AM
dim closed D45406: Document -std= values for different languages.
Apr 11 2018, 10:25 AM
dim added a comment to D45406: Document -std= values for different languages.

Ping

Apr 11 2018, 2:05 AM

Apr 9 2018

dim added a comment to D45406: Document -std= values for different languages.

So, does this look good enough to commit?

Apr 9 2018, 10:54 AM

Apr 8 2018

dim updated the diff for D45406: Document -std= values for different languages.

Attempt to put the standard values in to definition lists. In the HTML
output, this looks fairly nice, but as a man page, it seems a bit
strange, for example:

Apr 8 2018, 4:08 AM
dim added a comment to D45406: Document -std= values for different languages.

Well, my idea was to list the standards one per line (like on GCC manpage), and then the '(deprecated)' comments would probably stand out enough to apply to a single line. Also, FWICS the gcc manpage simply lists which aliases are deprecated in the description text. But skipping them entirely also works for me.

Apr 8 2018, 3:14 AM

Apr 7 2018

dim updated the diff for D45406: Document -std= values for different languages.
  • Use "values" instead of "options"
  • Remove deprecated standard values
Apr 7 2018, 3:30 PM
dim added a comment to D45406: Document -std= values for different languages.

To be honest, I find those '(deprecated)' confusing — the user may mistakenly assume that it's about all values rather than the alias.

Apr 7 2018, 12:33 PM
dim created D45406: Document -std= values for different languages.
Apr 7 2018, 12:26 PM

Apr 4 2018

dim added inline comments to rL322010: [TargetLibraryInfo] fix finite mathlib function availability.
Apr 4 2018, 11:35 AM
dim added a comment to rL322010: [TargetLibraryInfo] fix finite mathlib function availability.

Interestingly, adding some debug prints to ConstantFoldFP seems to indicate the the NativeFP call *does* give the correct result:

Apr 4 2018, 11:08 AM
dim updated subscribers of rL322010: [TargetLibraryInfo] fix finite mathlib function availability.
Apr 4 2018, 10:29 AM

Mar 28 2018

dim added a comment to D44536: Avoid segfault when destructor is not yet known.

Ping. Open to sugggestions here :)

Mar 28 2018, 1:45 PM

Mar 22 2018

dim accepted D41869: Rename llvm library from libLLVM-X.Y to libLLVM-X.

LGTM

Mar 22 2018, 4:33 AM

Mar 21 2018

dim accepted D41808: Rename clang link from clang-X.Y to clang-X.

LGTM.

Mar 21 2018, 4:10 AM

Mar 19 2018

dim added a comment to D44536: Avoid segfault when destructor is not yet known.

@rsmith, any objections?

Mar 19 2018, 3:44 PM

Mar 17 2018

dim added a comment to D44604: Make stdarg.h compatible with FreeBSD.

I'm fine with either this approach, or with the approach in stdint.h, e.g. using __has_include_next(), and in that case first including the system-provided header before this one.

Mar 17 2018, 5:19 PM
dim added a reviewer for D44604: Make stdarg.h compatible with FreeBSD: emaste.
Mar 17 2018, 5:15 PM
dim added inline comments to D41808: Rename clang link from clang-X.Y to clang-X.
Mar 17 2018, 7:20 AM

Mar 15 2018

dim added a comment to D44536: Avoid segfault when destructor is not yet known.

I'm not sure it's supposed to be a valid state to get into IRGen with a non-trivial destructor that isn't yet declared. Richard?

Mar 15 2018, 1:41 PM
dim created D44536: Avoid segfault when destructor is not yet known.
Mar 15 2018, 1:15 PM

Feb 28 2018

dim committed rL326358: Fix llvm-config --system-libs output on FreeBSD and NetBSD.
Fix llvm-config --system-libs output on FreeBSD and NetBSD
Feb 28 2018, 12:06 PM
dim closed D42702: Fix llvm-config --system-libs output on FreeBSD and NetBSD.
Feb 28 2018, 12:06 PM
dim updated the diff for D42702: Fix llvm-config --system-libs output on FreeBSD and NetBSD.

Update using @bdrewery's suggestion, with one small fix for Linux, where
Backtrace_LIBRARIES is usually an empty string.

Feb 28 2018, 8:04 AM

Feb 17 2018

dim committed rC325446: [X86] Add 'sahf' CPU feature to frontend.
[X86] Add 'sahf' CPU feature to frontend
Feb 17 2018, 1:10 PM
dim committed rL325446: [X86] Add 'sahf' CPU feature to frontend.
[X86] Add 'sahf' CPU feature to frontend
Feb 17 2018, 1:06 PM
dim closed D43394: [X86] Add 'sahf' CPU feature to frontend.
Feb 17 2018, 1:06 PM
dim retitled D43394: [X86] Add 'sahf' CPU feature to frontend from [X86] Add 'sahf' CPU feature, and emit __LAHFSAHF__ for it to [X86] Add 'sahf' CPU feature to frontend.
Feb 17 2018, 10:47 AM
dim updated the diff for D43394: [X86] Add 'sahf' CPU feature to frontend.

Remove the __LAHFSAHF__ predefined macro.

Feb 17 2018, 10:47 AM
dim accepted D43418: [X86] Add 'sahf' to getHostCPUFeatures so -march=native will pick it up correctly..

LGTM.

Feb 17 2018, 3:53 AM

Feb 16 2018

dim updated the diff for D43394: [X86] Add 'sahf' CPU feature to frontend.

Added the sahf feature for knm, knl and amdfam10 too.

Feb 16 2018, 3:24 PM
dim added inline comments to D43394: [X86] Add 'sahf' CPU feature to frontend.
Feb 16 2018, 2:57 PM
dim created D43394: [X86] Add 'sahf' CPU feature to frontend.
Feb 16 2018, 9:07 AM

Feb 13 2018

dim committed rL325028: Make the ctype_byname::widen test cases pass on FreeBSD..
Make the ctype_byname::widen test cases pass on FreeBSD.
Feb 13 2018, 9:45 AM
dim committed rCXX325028: Make the ctype_byname::widen test cases pass on FreeBSD..
Make the ctype_byname::widen test cases pass on FreeBSD.
Feb 13 2018, 9:45 AM
dim committed rL325027: Put type attributes after class keyword.
Put type attributes after class keyword
Feb 13 2018, 9:44 AM
dim committed rCXX325027: Put type attributes after class keyword.
Put type attributes after class keyword
Feb 13 2018, 9:44 AM
dim closed D43209: Put type attributes after class keyword.
Feb 13 2018, 9:44 AM
dim committed rT325026: Include <sys/time.h> to get struct timeval definition.
Include <sys/time.h> to get struct timeval definition
Feb 13 2018, 9:41 AM
dim committed rL325026: Include <sys/time.h> to get struct timeval definition.
Include <sys/time.h> to get struct timeval definition
Feb 13 2018, 9:41 AM
dim closed D43169: Include <sys/time.h> to get struct timeval definition.
Feb 13 2018, 9:41 AM

Feb 12 2018

dim created D43209: Put type attributes after class keyword.
Feb 12 2018, 2:20 PM
dim added a comment to D43168: Don't use -ldl on BSD.
In D43168#1005380, @dim wrote:

Apparently there is a halide_spawn_thread function in the bitcode. I am unsure if there is any source for that bitcode?

Feb 12 2018, 10:50 AM
dim added a comment to D43168: Don't use -ldl on BSD.

@asbirlea: Why is -dl and -pthread needed at all? Glancing at the code I don't see any reference to pthreads or dlopen/dlsym...

Feb 12 2018, 10:40 AM

Feb 11 2018

dim added a comment to D43159: Modernize: Use nullptr more..

So my main concern with this patch is that nullptr is actually #defined'ed in C++03 mode. That definition comes from the __nullptr header, and therefore we would need to add that header to each include which uses it. Which kind of sucks.

Feb 11 2018, 2:40 PM
dim committed rCXX324855: Add default C++ ABI libname and include paths for FreeBSD.
Add default C++ ABI libname and include paths for FreeBSD
Feb 11 2018, 2:34 PM
dim committed rL324855: Add default C++ ABI libname and include paths for FreeBSD.
Add default C++ ABI libname and include paths for FreeBSD
Feb 11 2018, 2:34 PM
dim closed D43166: Add default C++ ABI libname and include paths for FreeBSD.
Feb 11 2018, 2:34 PM
dim committed rT324848: Use CMAKE_DL_LIBS and CMAKE_THREAD_LIBS_INIT for Bitcode tests.
Use CMAKE_DL_LIBS and CMAKE_THREAD_LIBS_INIT for Bitcode tests
Feb 11 2018, 12:28 PM
dim committed rL324848: Use CMAKE_DL_LIBS and CMAKE_THREAD_LIBS_INIT for Bitcode tests.
Use CMAKE_DL_LIBS and CMAKE_THREAD_LIBS_INIT for Bitcode tests
Feb 11 2018, 12:18 PM
dim closed D43168: Don't use -ldl on BSD.
Feb 11 2018, 12:18 PM
dim added a comment to D43159: Modernize: Use nullptr more..

LGTM minus a few nits, though it would be nice if you can verify that all the changed headers still compile in -std=c++98 and/or -std=gnu++98 mode.

Feb 11 2018, 11:55 AM
dim created D43169: Include <sys/time.h> to get struct timeval definition.
Feb 11 2018, 11:45 AM
dim updated the diff for D43168: Don't use -ldl on BSD.

Update to use a for loop for iterating over CMAKE_DL_LIBS, and while we are here, also use CMake's FindThreads module and CMAKE_THREAD_LIBS_INIT (this will contain -lpthread, if it is necessary for the target system).

Feb 11 2018, 11:02 AM
dim added a comment to D43168: Don't use -ldl on BSD.

It looks like test-suite has some sort of special handling for test executables, where it uses LDFLAGS instead of target_link_libraries():

Feb 11 2018, 7:51 AM
dim added a comment to D43168: Don't use -ldl on BSD.

CMAKE_DL_LIBS allows us to fix it once for everybody and forever.

CMAKE_DL_LIBS is already used in llvm, e.g.

if( HAVE_LIBDL )
  set(system_libs ${system_libs} ${CMAKE_DL_LIBS})
endif()

in llvm/lib/Support/CMakeLists.txt

I don't want to repeat this process for AIX, SmartOS (they are now migrating to Clang at least for pkgsrc) etc.

Feb 11 2018, 7:39 AM
dim added a comment to D43168: Don't use -ldl on BSD.

One other problem is that CMAKE_DL_LIBS is meant for adding to cmake targets, e.g. it only contains the string "dl" on Linux. This means that you would have to add some sort of transformation to change it into "-ldl"... Way too complicated, if you ask me. :)

Feb 11 2018, 7:12 AM
dim added a comment to D43168: Don't use -ldl on BSD.

Can we use CMAKE_DL_LIBS?

Feb 11 2018, 7:08 AM
dim created D43168: Don't use -ldl on BSD.
Feb 11 2018, 7:02 AM

Feb 10 2018

dim created D43166: Add default C++ ABI libname and include paths for FreeBSD.
Feb 10 2018, 3:17 PM

Feb 7 2018

dim added a comment to D43016: Fix for #31362 - ms_abi is implemented incorrectly for larger values (>=16 bytes)..

FWIW, this allows me to build wine again for x86_64, without any crashes or assertions. So that looks good, in any case.

Feb 7 2018, 2:27 PM

Feb 6 2018

dim accepted D42972: Look for 32-bit libraries in /usr/lib32 for MIPS O32 on FreeBSD..

LGTM, though a test case would be nice (could be added to tools/clang/test/Driver/freebsd.c)

Feb 6 2018, 8:59 AM

Feb 1 2018

dim added a comment to D42702: Fix llvm-config --system-libs output on FreeBSD and NetBSD.

Hmm, apparently CMake *always* returns a full path for find_library(), but we seem to ignore those, by doing (for example in libclang's CMakeLists.txt):

Feb 1 2018, 11:33 AM
dim added a comment to D42702: Fix llvm-config --system-libs output on FreeBSD and NetBSD.
In D42702#995106, @dim wrote:

-l/usr/lib/libexecinfo.so this should be replaced with -lexecinfo.

As I said, this is something detected by CMake, not LLVM's scripts. We could attempt to submit a fix to CMake, but that will take quite some time to arrive, and some vendor versions (such as Red Hat's or Debian's) will not be fixed for years, if ever.

This means that we need to implement check manually, in worst case hardcode it under the FreeBSD|NetBSD OS.

Feb 1 2018, 10:40 AM
dim added a comment to D42702: Fix llvm-config --system-libs output on FreeBSD and NetBSD.

-l/usr/lib/libexecinfo.so this should be replaced with -lexecinfo.

Feb 1 2018, 10:20 AM

Jan 30 2018

dim created D42702: Fix llvm-config --system-libs output on FreeBSD and NetBSD.
Jan 30 2018, 12:10 PM

Jan 20 2018

dim committed rL323041: Assume the shared library path variable is LD_LIBRARY_PATH on systems.
Assume the shared library path variable is LD_LIBRARY_PATH on systems
Jan 20 2018, 6:36 AM
dim committed rL323040: Assume the shared library path variable is LD_LIBRARY_PATH on systems.
Assume the shared library path variable is LD_LIBRARY_PATH on systems
Jan 20 2018, 6:36 AM
dim committed rCTE323040: Assume the shared library path variable is LD_LIBRARY_PATH on systems.
Assume the shared library path variable is LD_LIBRARY_PATH on systems
Jan 20 2018, 6:36 AM
dim committed rL323038: Merging r322875:.
Merging r322875:
Jan 20 2018, 4:23 AM
dim committed rL323037: Merging r322869:.
Merging r322869:
Jan 20 2018, 4:19 AM

Jan 18 2018

dim committed rL322879: Follow-up to rL322875 by initializing the do_libcxxabi variable properly..
Follow-up to rL322875 by initializing the do_libcxxabi variable properly.
Jan 18 2018, 11:33 AM
dim committed rL322875: Add a -no-libcxxabi option to the test-release.sh script..
Add a -no-libcxxabi option to the test-release.sh script.
Jan 18 2018, 10:42 AM
dim committed rL322869: Sprinkle a few <cstdlib> includes, for libomptarget sources using.
Sprinkle a few <cstdlib> includes, for libomptarget sources using
Jan 18 2018, 10:27 AM