Home » Community » U++ community news and announcements » U++ 2019.1.rc4 released
Re: U++ 2019.1.rc4 released [message #51654 is a reply to message #51646] |
Tue, 23 April 2019 15:33   |
Novo
Messages: 1430 Registered: December 2006
|
Ultimate Contributor |
|
|
mirek wrote on Tue, 23 April 2019 03:53TheIDE now seems to run 'ubsan clean' (with GCC), but I really have mixed feeling about santizing bools:
struct Foo { bool a, b; };
Foo a, b;
a = b;
Above code fails with ubsan, as a / b are uninitialized. In practice this means you have to initialize all bool member variables if the struct is to be copied even if code logic absolutely does not need it....
I'm personally not getting any messages with ubsan + gcc + C++17 + Debug in this case. Everything is clean.
I'm getting them with ubsan + clang + C++17 + Debug.
/home/ssg/dvlp/cpp/upp/git/uppsrc/Core/Hash.cpp:308:33: runtime error: load of misaligned address 0x0000008c646e for type 'const unsigned int', which requires 4 byte alignment
0x0000008c646e: note: pointer points here
41 47 45 00 45 6d 70 74 79 20 64 72 69 76 65 00 44 72 69 76 65 20 76 61 63 c3 ad 6f 00 4c 65 65
^
/home/ssg/dvlp/cpp/upp/git/uppsrc/Core/Ops.h:7:63: runtime error: store to misaligned address 0x7f7ca993b222 for type 'Upp::dword' (aka 'unsigned int'), which requires 4 byte alignment
0x7f7ca993b222: note: pointer points here
65 65 46 72 65 65 46 72 65 65 46 72 65 65 46 72 65 65 46 72 65 65 46 72 65 65 46 72 65 65 46 72
^
/home/ssg/dvlp/cpp/upp/git/uppsrc/Core/Ops.h:3:59: runtime error: load of misaligned address 0x7f7ca993b222 for type 'const Upp::dword' (aka 'const unsigned int'), which requires 4 byte alignment
0x7f7ca993b222: note: pointer points here
35 00 46 72 fe 4c 6c 56 65 65 46 72 65 65 46 72 65 65 46 72 65 65 46 72 65 65 46 72 65 65 46 72
^
It doesn't look like NOUBSAN is defined for Clang.
I'm also getting a bunch of warnings with Clang + C++17.
In file included from /home/ssg/dvlp/cpp/upp/git/uppsrc/Core/Core.h:280:
/home/ssg/dvlp/cpp/upp/git/uppsrc/Core/Stream.h:94:141: warning: add explicit braces to avoid dangling else [-Wdangling-else]
void Put(const void *data, int size) { ASSERT(size >= 0); if(size) if(ptr + size <= wrlim) { memcpy(ptr, data, size);
ptr += size; } else _Put(data, size); }
One of the reasons why I'm using Clang on Linux is because it has the best support for sanitizers.
I attached my project and build methods for clang and gcc.
Regards,
Novo
|
|
|
 |
|
U++ 2019.1.rc4 released
By: mirek on Mon, 15 April 2019 08:23
|
 |
|
Re: U++ 2019.1.rc4 released
By: koldo on Mon, 15 April 2019 08:54
|
 |
|
Re: U++ 2019.1.rc4 released
By: Tom1 on Tue, 16 April 2019 08:39
|
 |
|
Re: U++ 2019.1.rc4 released
|
 |
|
Re: U++ 2019.1.rc4 released
By: Novo on Wed, 17 April 2019 21:31
|
 |
|
Re: U++ 2019.1.rc4 released
By: mirek on Thu, 18 April 2019 10:53
|
 |
|
Re: U++ 2019.1.rc4 released
By: Novo on Fri, 19 April 2019 00:32
|
 |
|
Re: U++ 2019.1.rc4 released
By: mirek on Fri, 19 April 2019 12:27
|
 |
|
Re: U++ 2019.1.rc4 released
By: Novo on Fri, 19 April 2019 16:43
|
 |
|
Re: U++ 2019.1.rc4 released
|
 |
|
Re: U++ 2019.1.rc4 released
By: forlano on Wed, 17 April 2019 23:43
|
 |
|
Re: U++ 2019.1.rc4 released
By: Novo on Thu, 18 April 2019 00:22
|
 |
|
Re: U++ 2019.1.rc4 released
By: mirek on Thu, 18 April 2019 07:59
|
 |
|
Re: U++ 2019.1.rc4 released
By: mirek on Thu, 18 April 2019 08:03
|
 |
|
Re: U++ 2019.1.rc4 released
|
 |
|
Re: U++ 2019.1.rc4 released
By: Tom1 on Thu, 18 April 2019 10:30
|
 |
|
Re: U++ 2019.1.rc4 released
By: Novo on Thu, 18 April 2019 22:20
|
 |
|
Re: U++ 2019.1.rc4 released
By: Novo on Sat, 20 April 2019 00:33
|
 |
|
Re: U++ 2019.1.rc4 released
By: mirek on Mon, 22 April 2019 11:03
|
 |
|
Re: U++ 2019.1.rc4 released
By: Novo on Sat, 20 April 2019 00:51
|
 |
|
Re: U++ 2019.1.rc4 released
By: mirek on Mon, 22 April 2019 11:08
|
 |
|
Re: U++ 2019.1.rc4 released
By: mirek on Tue, 23 April 2019 09:53
|
 |
|
Re: U++ 2019.1.rc4 released
By: Novo on Tue, 23 April 2019 15:33
|
 |
|
Re: U++ 2019.1.rc4 released
By: Novo on Tue, 23 April 2019 15:36
|
 |
|
Re: U++ 2019.1.rc4 released
By: Novo on Tue, 23 April 2019 15:05
|
 |
|
Re: U++ 2019.1.rc4 released
By: Novo on Sat, 20 April 2019 00:57
|
 |
|
Re: U++ 2019.1.rc4 released
By: mirek on Sat, 20 April 2019 01:06
|
 |
|
Re: U++ 2019.1.rc4 released
By: Novo on Sat, 20 April 2019 04:46
|
Goto Forum:
Current Time: Mon Jul 14 21:39:16 CEST 2025
Total time taken to generate the page: 0.04672 seconds
|