Page MenuHome GnuPG

clangTag
ActivePublic

Members

  • This project does not have any members.
  • View All

Watchers

  • This project does not have any watchers.
  • View All

Recent Activity

Apr 26 2021

jukivili closed T5255: libgcrypt: build "error: invalid operand for instruction" when compiling with Clang & LTO as Resolved.
Apr 26 2021, 5:43 PM · asm, libgcrypt, clang, Bug Report

Apr 15 2021

werner triaged T5373: Using GCRY_THREAD_OPTION_PTHREAD_IMPL in a file compiled with Clang generates deprecation warning as Low priority.
Apr 15 2021, 9:01 AM · clang, libgcrypt, Bug Report

Mar 29 2021

werner added projects to T5373: Using GCRY_THREAD_OPTION_PTHREAD_IMPL in a file compiled with Clang generates deprecation warning: libgcrypt, clang.

Yet another identify theft scam committed by clang.

Mar 29 2021, 10:22 PM · clang, libgcrypt, Bug Report

Feb 12 2021

werner closed T5259: Release Libgcrypt 1.9.1, a subtask of T5255: libgcrypt: build "error: invalid operand for instruction" when compiling with Clang & LTO, as Resolved.
Feb 12 2021, 12:34 PM · asm, libgcrypt, clang, Bug Report

Feb 6 2021

jukivili closed T5256: libgcrypt, convert Intel syntax x86_64 assembly files to AT&T syntax as Resolved.

Problem with clang and these files was resolved by replacement of assembler macros with C preprocessor macros.

Feb 6 2021, 12:47 PM · asm, clang, libgcrypt
jukivili closed T5256: libgcrypt, convert Intel syntax x86_64 assembly files to AT&T syntax, a subtask of T5255: libgcrypt: build "error: invalid operand for instruction" when compiling with Clang & LTO, as Resolved.
Feb 6 2021, 12:47 PM · asm, libgcrypt, clang, Bug Report

Jan 29 2021

werner changed the status of T5259: Release Libgcrypt 1.9.1, a subtask of T5255: libgcrypt: build "error: invalid operand for instruction" when compiling with Clang & LTO, from Open to Testing.
Jan 29 2021, 11:25 AM · asm, libgcrypt, clang, Bug Report
gniibe added a subtask for T5255: libgcrypt: build "error: invalid operand for instruction" when compiling with Clang & LTO: T5259: Release Libgcrypt 1.9.1.
Jan 29 2021, 1:11 AM · asm, libgcrypt, clang, Bug Report

Jan 23 2021

jukivili added a comment to T5255: libgcrypt: build "error: invalid operand for instruction" when compiling with Clang & LTO.

That might be helpful. But, on the other hand, if I had just googled the problem I was seeing I would have gotten answer quite fast.

Jan 23 2021, 4:51 PM · asm, libgcrypt, clang, Bug Report

Jan 22 2021

werner added a comment to T5255: libgcrypt: build "error: invalid operand for instruction" when compiling with Clang & LTO.

Should we add this to the hints in the README? After all this does not seem to be the standard system compiler or it has not been properly setup as replacement.

Jan 22 2021, 5:47 PM · asm, libgcrypt, clang, Bug Report
jukivili added a comment to T5255: libgcrypt: build "error: invalid operand for instruction" when compiling with Clang & LTO.

Problem was that my build system was selecting "ar" and "ranlib", where as your build system selects "llvm-ar" and "llvm-ranlib".

Jan 22 2021, 5:33 PM · asm, libgcrypt, clang, Bug Report

Jan 21 2021

telans added a comment to T5255: libgcrypt: build "error: invalid operand for instruction" when compiling with Clang & LTO.

Unfortunately these are not enough to enable building with clang LTO. Build now fails when linking test executables (libgcrypt.so gets build however):

Any ideas what might be causing this?

Jan 21 2021, 9:47 PM · asm, libgcrypt, clang, Bug Report
jukivili added a comment to T5255: libgcrypt: build "error: invalid operand for instruction" when compiling with Clang & LTO.

Configure output has still has some differences LTO vs non-LTO:

--- non-lto.log 2021-01-21 22:25:14.966099577 +0200
+++ lto.log     2021-01-21 22:25:23.174086100 +0200
@@ -63,7 +63,7 @@
 checking for archiver @FILE support... @
 checking for strip... strip
 checking for ranlib... ranlib
-checking command to parse /usr/bin/nm -B output from clang object... ok
+checking command to parse /usr/bin/nm -B output from clang object... failed
 checking for sysroot... no
 checking for mt... mt
 checking if mt is a manifest tool... no
@@ -75,7 +75,7 @@
 checking if clang static flag -static works... yes
 checking if clang supports -c -o file.o... yes
 checking if clang supports -c -o file.o... (cached) yes
-checking whether the clang linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
+checking whether the clang linker (/usr/bin/ld) supports shared libraries... yes
 checking whether -lc should be explicitly linked in... no
 checking dynamic linker characteristics... GNU/Linux ld.so
 checking how to hardcode library paths into programs... immediate
@@ -168,8 +168,8 @@
 checking whether 'asm' assembler keyword is supported... yes
 checking whether '__asm__' assembler keyword is supported... yes
 checking whether inline assembly memory barrier is supported... yes
-checking whether GCC assembler is compatible for ARM assembly implementations... no
-checking whether GCC assembler is compatible for ARMv8/Aarch64 assembly implementations... no
+checking whether GCC assembler is compatible for ARM assembly implementations... yes
+checking whether GCC assembler is compatible for ARMv8/Aarch64 assembly implementations... yes
 checking whether GCC assembler supports for CFI directives... yes
 checking whether GCC assembler supports for ELF directives... yes
 checking for _ prefix in compiled symbols... no
@@ -240,7 +240,7 @@
 checking if gcc supports -Wno-missing-field-initializers... yes
 checking if gcc supports -Wpointer-arith... yes
 checking whether non excutable stack support is requested... yes
-checking whether assembler supports --noexecstack option... yes
+checking whether assembler supports --noexecstack option... no
 checking that generated files are newer than configure... done
 configure: creating ./config.status
 config.status: creating Makefile
Jan 21 2021, 9:27 PM · asm, libgcrypt, clang, Bug Report
jukivili added a comment to T5255: libgcrypt: build "error: invalid operand for instruction" when compiling with Clang & LTO.

Clang support Intel syntax after all, but not assembler macros that were used. Here's two patches that fix the configure.ac issue and removes use of assembly macros in Intel syntax assembly files:

Jan 21 2021, 9:23 PM · asm, libgcrypt, clang, Bug Report

Jan 20 2021

werner triaged T5256: libgcrypt, convert Intel syntax x86_64 assembly files to AT&T syntax as Normal priority.
Jan 20 2021, 2:11 PM · asm, clang, libgcrypt
jukivili added a subtask for T5255: libgcrypt: build "error: invalid operand for instruction" when compiling with Clang & LTO: T5256: libgcrypt, convert Intel syntax x86_64 assembly files to AT&T syntax.
Jan 20 2021, 1:24 PM · asm, libgcrypt, clang, Bug Report
jukivili added a comment to T5255: libgcrypt: build "error: invalid operand for instruction" when compiling with Clang & LTO.

Breakage appears to happen in configure.ac. When building with clang without LTO following check gives "no":

Jan 20 2021, 1:14 PM · asm, libgcrypt, clang, Bug Report
telans added a comment to T5255: libgcrypt: build "error: invalid operand for instruction" when compiling with Clang & LTO.

Both are affected. I updated to reflect that I tested the newer version

Jan 20 2021, 9:39 AM · asm, libgcrypt, clang, Bug Report
werner triaged T5255: libgcrypt: build "error: invalid operand for instruction" when compiling with Clang & LTO as Normal priority.
Jan 20 2021, 9:33 AM · asm, libgcrypt, clang, Bug Report

Sep 21 2017

werner closed T3247: SIGILL in prepare_macpads() at md.c:681 as Resolved.

Closing due to compiler error.

Sep 21 2017, 3:39 PM · clang, Ubuntu, libgcrypt, Bug Report

Aug 1 2017

chrullrich added a comment to T3293: libgcrypt: warning: unknown pragma "#pragma GCC optimize" ignored => compile failure with LLVM 5.0.

No, it's not. It still misses "-O" entirely.

Aug 1 2017, 2:26 PM · clang, libgcrypt, Bug Report
cpm closed T3293: libgcrypt: warning: unknown pragma "#pragma GCC optimize" ignored => compile failure with LLVM 5.0 as Resolved.

It's solved!

Aug 1 2017, 2:24 PM · clang, libgcrypt, Bug Report

Jul 24 2017

chrullrich added a comment to T3293: libgcrypt: warning: unknown pragma "#pragma GCC optimize" ignored => compile failure with LLVM 5.0.

The fixed sed expression still does not work correctly; it misses the plain "-O" form of the option. As per gcc docs, -O is the same as -O1, and clang accepts it (and the build falls over with it) even though it does not document it at all.

Jul 24 2017, 10:41 AM · clang, libgcrypt, Bug Report
werner triaged T3293: libgcrypt: warning: unknown pragma "#pragma GCC optimize" ignored => compile failure with LLVM 5.0 as Low priority.

The warning is just a warning, so no problem. The pragma even indicates the compiler for which it is intended.

Jul 24 2017, 9:41 AM · clang, libgcrypt, Bug Report

Jul 6 2017

jukivili added a comment to T3247: SIGILL in prepare_macpads() at md.c:681.

I did some experimenting and clang SIGILL does not trigger with commonly used, but non-conforming, variable-length object with "struct hack", as below:

Jul 6 2017, 1:22 PM · clang, Ubuntu, libgcrypt, Bug Report

Jul 5 2017

werner added a comment to T3247: SIGILL in prepare_macpads() at md.c:681.

With an integer overflow.

Jul 5 2017, 3:23 PM · clang, Ubuntu, libgcrypt, Bug Report
marcus added a comment to T3247: SIGILL in prepare_macpads() at md.c:681.

This is a standard dynamic sized array:

Jul 5 2017, 3:05 PM · clang, Ubuntu, libgcrypt, Bug Report
werner added a comment to T3247: SIGILL in prepare_macpads() at md.c:681.

Sorry, this is a standard C feature and the only way to have dynamic sized arrays. CLANG simply does not get this pattern right. Grep for pgut001's very comments on such ill behaving compilers (including gcc).

Jul 5 2017, 2:59 PM · clang, Ubuntu, libgcrypt, Bug Report
marcus added a comment to T3247: SIGILL in prepare_macpads() at md.c:681.

At a meta level, I really think that writing more conservative code that enables compilers to do a better job checking for safety is a good idea. The tricks we do with structs are premature optimization from a time when compilers were dumb as a doornail.

Jul 5 2017, 2:56 PM · clang, Ubuntu, libgcrypt, Bug Report
marcus added a comment to T3247: SIGILL in prepare_macpads() at md.c:681.

Maybe casting to a void* helps to disable the check in the compiler.

Jul 5 2017, 2:52 PM · clang, Ubuntu, libgcrypt, Bug Report
gniibe added a comment to T3247: SIGILL in prepare_macpads() at md.c:681.

I can replicate the issue on my system.
It is not the line 681, actually.

Jul 5 2017, 4:07 AM · clang, Ubuntu, libgcrypt, Bug Report

Jul 4 2017

gniibe claimed T3247: SIGILL in prepare_macpads() at md.c:681.

I think that the problem is in your usage with your tool. Please have a look at md_open function in cipher/md.c.
This bug is not the one in libgcrypt, but in the compiler.

Jul 4 2017, 6:27 AM · clang, Ubuntu, libgcrypt, Bug Report
gniibe closed T3246: md5.c:119:3: runtime error: unsigned integer overflow: 2612846078 + 3614090360 cannot be represented in type 'unsigned int' as Invalid.

Same argument can apply to MD5. See T3249: sha256.c:265:3: runtime error: unsigned integer overflow: 4084723048 + 1633837952 cannot be represented in type 'unsigned int' of SHA2.

Jul 4 2017, 5:10 AM · clang, Ubuntu, libgcrypt, Bug Report
gniibe closed T3250: random-csprng.c:1070:16: runtime error: unsigned integer overflow: 0 - 1 cannot be represented in type 'size_t' (aka 'unsigned long') as Invalid.

See T3245: cipher-gcm-intel-pclmul.c:418:17: runtime error: unsigned integer overflow: 0 - 1 cannot be represented in type 'size_t' (aka 'unsigned long').

Jul 4 2017, 5:08 AM · clang, Ubuntu, libgcrypt, Bug Report
gniibe closed T3245: cipher-gcm-intel-pclmul.c:418:17: runtime error: unsigned integer overflow: 0 - 1 cannot be represented in type 'size_t' (aka 'unsigned long') as Invalid.

See T3248: mpiutil.c:501:37: runtime error: unsigned integer overflow: 0 - 1 cannot be represented in type 'unsigned long' for unsigned integer overflow.

Jul 4 2017, 5:06 AM · clang, Ubuntu, libgcrypt, Bug Report
gniibe closed T3248: mpiutil.c:501:37: runtime error: unsigned integer overflow: 0 - 1 cannot be represented in type 'unsigned long' as Invalid.

It is intentionally used.
And in the C programming language, it is defined that unsigned integer never overflows (it is computed as modulo 2).

Jul 4 2017, 4:58 AM · clang, Ubuntu, libgcrypt, Bug Report
gniibe closed T3251: sha512.c:342:25: runtime error: unsigned integer overflow: 17296268247117069635 + 2271443192277056827 cannot be represented in type 'unsigned long' as Invalid.

See T3249: sha256.c:265:3: runtime error: unsigned integer overflow: 4084723048 + 1633837952 cannot be represented in type 'unsigned int'.

Jul 4 2017, 4:54 AM · clang, Ubuntu, libgcrypt, Bug Report
geeknik created T3251: sha512.c:342:25: runtime error: unsigned integer overflow: 17296268247117069635 + 2271443192277056827 cannot be represented in type 'unsigned long'.
Jul 4 2017, 3:11 AM · clang, Ubuntu, libgcrypt, Bug Report
geeknik created T3250: random-csprng.c:1070:16: runtime error: unsigned integer overflow: 0 - 1 cannot be represented in type 'size_t' (aka 'unsigned long').
Jul 4 2017, 3:11 AM · clang, Ubuntu, libgcrypt, Bug Report
geeknik created T3248: mpiutil.c:501:37: runtime error: unsigned integer overflow: 0 - 1 cannot be represented in type 'unsigned long'.
Jul 4 2017, 3:11 AM · clang, Ubuntu, libgcrypt, Bug Report
geeknik created T3247: SIGILL in prepare_macpads() at md.c:681.
Jul 4 2017, 3:11 AM · clang, Ubuntu, libgcrypt, Bug Report
geeknik created T3246: md5.c:119:3: runtime error: unsigned integer overflow: 2612846078 + 3614090360 cannot be represented in type 'unsigned int'.
Jul 4 2017, 3:11 AM · clang, Ubuntu, libgcrypt, Bug Report
geeknik created T3245: cipher-gcm-intel-pclmul.c:418:17: runtime error: unsigned integer overflow: 0 - 1 cannot be represented in type 'size_t' (aka 'unsigned long').
Jul 4 2017, 3:10 AM · clang, Ubuntu, libgcrypt, Bug Report

Mar 30 2017

admin created clang.
Mar 30 2017, 6:42 PM

Nov 8 2012

werner closed T1435: duplicate syms in libmpi as Resolved.
Nov 8 2012, 3:48 PM · clang, Bug Report, gnupg
werner removed a project from T1435: duplicate syms in libmpi: Won't Fix.
Nov 8 2012, 3:47 PM · clang, Bug Report, gnupg
werner added a comment to T1435: duplicate syms in libmpi.

Fixed in git for gnupg 1.4.13, Libgcrypt 1.5.1 and Libgcrypt 1.6.0.

The reason why I was not able to replicate this bug was that
I didn't use -std=c99 with gcc >= 4.3.

Nov 8 2012, 3:47 PM · clang, Bug Report, gnupg

Aug 9 2012

werner added a project to T1432: rijndael implementation contains ambiguos instructions: clang.
Aug 9 2012, 4:04 PM · clang, Bug Report, libgcrypt, Not A Bug
werner added a project to T1431: libgcrypt depends on gnu extensions which hinders clang compilation: clang.
Aug 9 2012, 4:04 PM · clang, Bug Report, libgcrypt
werner closed T1431: libgcrypt depends on gnu extensions which hinders clang compilation as Resolved.
Aug 9 2012, 4:04 PM · clang, Bug Report, libgcrypt