Displaying 3 results from an estimated 3 matches for "weidai11".
2018 Jun 30
4
Determine reason for failure at -O1
Hi Everyone,
We caught a report for a failed self test when using Clang 5.0 and 6.0
with -DDEBUG and -O1 (i.e., a "debug build"). The code is question is
located at https://github.com/weidai11/cryptopp/blob/master/cham-simd.cpp
. It is the SSSE3 code path for CHAM64.
Other optimizations levels are OK for Clang. GCC, ICC and MSVC are OK.
The code is valgrind, Sanitizer, Coverity and Enterprise Analysis
clean.
An objdump is available at https://pastebin.com/TAKH4eur but it is not
very he...
2017 Dec 16
3
Clang 5, UBsan, runtime error: addition of unsigned offset to X overflowed to Y
We have code that processes a buffer in the forward or backwards
direction. It looks similar to the following
(https://github.com/weidai11/cryptopp/blob/master/adv-simd.h#L1138):
uint8_t * ptr = ...
size_t len = ...
size_t inc = 16;
if (flags & REVERSE_DIRECTION)
{
ptr += len - inc;
inc = 0-inc;
}
while (len > 16)
{
// process blocks
ptr += inc;
len -= 16;
}
Clang 5.0 and UBsan is producing findings
(ht...
2018 Dec 01
2
Restrict global constructors to base ISA
...global constructors?
Thanks in advance.
==========
Here's the full command line used for a typical file:
/opt/local/bin/clang++-mp-5.0 -DNDEBUG -g2 -O3 -fPIC -pthread -pipe -c
cryptlib.cpp
Here's the source file. I don't believe it has global data provided by
us: https://github.com/weidai11/cryptopp/blob/master/chacha_avx.cpp
==========
(lldb) r v
...
* thread #1: tid = 0x19f83aa, 0x000000010016ec49
cryptest.exe`_GLOBAL__sub_I_chacha_avx.cpp at string:1322, queue =
'com.apple.main-thread', stop reason = EXC_BAD_INSTRUCTION
(code=EXC_I386_INVOP, subcode=0x0)
frame #0: 0x0...