Page MenuHomePhabricator

sberg (Stephan Bergmann)
User

Projects

User does not belong to any projects.

User Details

User Since
Aug 26 2015, 8:20 AM (202 w, 5 d)

Recent Activity

Today

sberg updated the diff for D61479: Finish "Adapt -fsanitize=function to SANITIZER_NON_UNIQUE_TYPEINFO".
  • Disallowed -fsanitize=function in combination with -fsanitize-minimal-runtime now.
Mon, Jul 15, 8:00 AM · Restricted Project, Restricted Project, Restricted Project

Wed, Jun 26

sberg updated subscribers of D61479: Finish "Adapt -fsanitize=function to SANITIZER_NON_UNIQUE_TYPEINFO".

Any thoughts on this? (cfe-commits had inadvertently been missing from subscribers, it touches clang as well as compiler-rt.)

Wed, Jun 26, 11:50 PM · Restricted Project, Restricted Project, Restricted Project

Mon, Jun 24

sberg added a project to D61479: Finish "Adapt -fsanitize=function to SANITIZER_NON_UNIQUE_TYPEINFO": Restricted Project.
Mon, Jun 24, 12:11 PM · Restricted Project, Restricted Project, Restricted Project
sberg added a comment to D61479: Finish "Adapt -fsanitize=function to SANITIZER_NON_UNIQUE_TYPEINFO".

friendly ping

Mon, Jun 24, 12:11 PM · Restricted Project, Restricted Project, Restricted Project

Tue, Jun 18

sberg added a comment to D61479: Finish "Adapt -fsanitize=function to SANITIZER_NON_UNIQUE_TYPEINFO".

friendly ping

Tue, Jun 18, 8:01 AM · Restricted Project, Restricted Project, Restricted Project

Jun 11 2019

sberg added a comment to D61479: Finish "Adapt -fsanitize=function to SANITIZER_NON_UNIQUE_TYPEINFO".

friendly ping

Jun 11 2019, 1:18 AM · Restricted Project, Restricted Project, Restricted Project

Jun 4 2019

sberg added a comment to D61479: Finish "Adapt -fsanitize=function to SANITIZER_NON_UNIQUE_TYPEINFO".

friendly ping

Jun 4 2019, 12:26 AM · Restricted Project, Restricted Project, Restricted Project

May 21 2019

sberg updated the diff for D61479: Finish "Adapt -fsanitize=function to SANITIZER_NON_UNIQUE_TYPEINFO".

Of course, adding missing tests reveals shortcomings in the new code.

May 21 2019, 7:01 AM · Restricted Project, Restricted Project, Restricted Project

May 2 2019

sberg added a comment to D60760: Adapt -fsanitize=function to SANITIZER_NON_UNIQUE_TYPEINFO.

Added missing tests at https://reviews.llvm.org/D61479 "Add tests for 'Adapt -fsanitize=function to SANITIZER_NON_UNIQUE_TYPEINFO'".

May 2 2019, 11:57 PM · Restricted Project, Restricted Project, Restricted Project
sberg created D61479: Finish "Adapt -fsanitize=function to SANITIZER_NON_UNIQUE_TYPEINFO".
May 2 2019, 11:55 PM · Restricted Project, Restricted Project, Restricted Project
sberg added a comment to D60760: Adapt -fsanitize=function to SANITIZER_NON_UNIQUE_TYPEINFO.

Did this get reviewed?

May 2 2019, 1:27 AM · Restricted Project, Restricted Project, Restricted Project
sberg committed rG2f0ef58e535c: Fix for Windows (authored by sberg).
Fix for Windows
May 2 2019, 12:05 AM
sberg committed rCRT359760: Fix for Windows.
Fix for Windows
May 2 2019, 12:03 AM
sberg committed rL359760: Fix for Windows.
Fix for Windows
May 2 2019, 12:03 AM

May 1 2019

sberg committed rG5745eccef54d: Adapt -fsanitize=function to SANITIZER_NON_UNIQUE_TYPEINFO (authored by sberg).
Adapt -fsanitize=function to SANITIZER_NON_UNIQUE_TYPEINFO
May 1 2019, 11:40 PM
sberg committed rL359759: Adapt -fsanitize=function to SANITIZER_NON_UNIQUE_TYPEINFO.
Adapt -fsanitize=function to SANITIZER_NON_UNIQUE_TYPEINFO
May 1 2019, 11:40 PM
sberg committed rCRT359759: Adapt -fsanitize=function to SANITIZER_NON_UNIQUE_TYPEINFO.
Adapt -fsanitize=function to SANITIZER_NON_UNIQUE_TYPEINFO
May 1 2019, 11:40 PM
sberg committed rC359759: Adapt -fsanitize=function to SANITIZER_NON_UNIQUE_TYPEINFO.
Adapt -fsanitize=function to SANITIZER_NON_UNIQUE_TYPEINFO
May 1 2019, 11:40 PM
sberg closed D60760: Adapt -fsanitize=function to SANITIZER_NON_UNIQUE_TYPEINFO.
May 1 2019, 11:40 PM · Restricted Project, Restricted Project, Restricted Project

Apr 23 2019

sberg added a comment to D60760: Adapt -fsanitize=function to SANITIZER_NON_UNIQUE_TYPEINFO.

friendly ping

Apr 23 2019, 2:01 AM · Restricted Project, Restricted Project, Restricted Project

Apr 16 2019

sberg added inline comments to D60760: Adapt -fsanitize=function to SANITIZER_NON_UNIQUE_TYPEINFO.
Apr 16 2019, 1:08 AM · Restricted Project, Restricted Project, Restricted Project
sberg created D60760: Adapt -fsanitize=function to SANITIZER_NON_UNIQUE_TYPEINFO.
Apr 16 2019, 1:08 AM · Restricted Project, Restricted Project, Restricted Project

Feb 13 2019

sberg added a comment to D58056: Look through typedefs in getFunctionTypeWithExceptionSpec.

committed for now to get the crash fixed; if there are issues with the test they can be addressed later

Feb 13 2019, 1:44 AM · Restricted Project
sberg committed rG84dcc8f36fe2: Look through typedefs in getFunctionTypeWithExceptionSpec (authored by sberg).
Look through typedefs in getFunctionTypeWithExceptionSpec
Feb 13 2019, 1:42 AM
sberg committed rL353931: Look through typedefs in getFunctionTypeWithExceptionSpec.
Look through typedefs in getFunctionTypeWithExceptionSpec
Feb 13 2019, 1:42 AM
sberg committed rC353931: Look through typedefs in getFunctionTypeWithExceptionSpec.
Look through typedefs in getFunctionTypeWithExceptionSpec
Feb 13 2019, 1:42 AM
sberg closed D58056: Look through typedefs in getFunctionTypeWithExceptionSpec.
Feb 13 2019, 1:42 AM · Restricted Project

Feb 11 2019

sberg added a comment to D58056: Look through typedefs in getFunctionTypeWithExceptionSpec.

The change itself should probably be uncontroversial (the bad cast had been there ever since getFunctionTypeWithExceptionSpec had been introduced with r221918), but I'm not sure about the test: It tests the relevant code somewhat indirectly; is it fine in clang/test/AST/?; or is such a test even overkill?

Feb 11 2019, 8:52 AM · Restricted Project
sberg created D58056: Look through typedefs in getFunctionTypeWithExceptionSpec.
Feb 11 2019, 8:47 AM · Restricted Project

Jan 16 2019

sberg added a comment to D55741: Implementation Feature Test Macros for P0722R3.

One problem I found with the macro __cpp_impl_destroying_delete not being conditional on language version is the following: Recent GCC trunk (since https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=76b94d4ba654e9af1882865933343d11f5c3b18b "Implement P0722R3, destroying operator delete.") contains

#if __cpp_impl_destroying_delete
#define __cpp_lib_destroying_delete 201806L
namespace std
{
  struct destroying_delete_t
  {
    explicit destroying_delete_t() = default;
  };
  inline constexpr destroying_delete_t destroying_delete{};
}
#endif // destroying delete

at "top-level" (i.e., not in a C++20-only #if or similar) in libstdc++-v3/libsupc++/new. That means that when using Clang against that GCC toolchain, #include <new> in C++03 mode will cause error: unknown type name 'constexpr'.

Jan 16 2019, 2:50 PM · Restricted Project

Nov 1 2018

sberg added a comment to D53974: [clang-tidy] new check: bugprone-too-small-loop-variable.

I run the new checker on LibreOffice project. I found ~25 false positives, which seems small enough to me. This false positives can be supressed easily.

Nov 1 2018, 7:46 AM · Restricted Project

Oct 23 2018

sberg added a comment to D52400: Improve -Wshadow warnings with enumerators.

I've silenced this scenario in r344898, thank you for raising the issue!

Oct 23 2018, 12:59 AM

Oct 17 2018

sberg added a comment to D52400: Improve -Wshadow warnings with enumerators.

[...]

Then again, this is a case where you don't get any error but you do get a silent behavioral ambiguity without the current enumerator shadow diagnostic:

struct S1;
struct S2;
struct S3 {
  void S1();
  enum { S2 };

  void f(decltype(S2) s);
};

So there are cases where this behavior can be somewhat useful.

Oct 17 2018, 2:41 AM

Oct 16 2018

sberg added a comment to D52400: Improve -Wshadow warnings with enumerators.

doesnt this make -Wshadow more aggressive for enumerators than for other entities?

Oct 16 2018, 3:38 AM

May 31 2018

sberg committed rCRT333638: Missing include.
Missing include
May 31 2018, 2:30 AM
sberg committed rL333638: Missing include.
Missing include
May 31 2018, 2:30 AM

Apr 18 2018

sberg added a comment to D45112: [MS] Emit vftable thunks for functions with incomplete prototypes.

see https://bugs.llvm.org/show_bug.cgi?id=37161 "clang-cl triggers ASTContext::getASTRecordLayout Assertion `D && 'Cannot get layout of forward declarations!''" for what appears to be fallout from this change

Apr 18 2018, 7:05 AM

Apr 17 2018

sberg added a comment to D45601: Warn on bool* to bool conversion.

A random data point from trying this patch on the LibreOffice code base:

Apr 17 2018, 2:12 AM
sberg added a comment to D41228: [ObjC] Enable __strong pointers in structs under ARC.

It looks like this caused a clang-cl regression https://bugs.llvm.org/show_bug.cgi?id=37146 "clang-cl emits special functions for non-trivial C-structs ('__destructor_8') introduced for Objective-C".

Apr 17 2018, 12:09 AM

Mar 7 2018

sberg committed rC326990: Propagate DLLAttr to friend re-declarations of member functions.
Propagate DLLAttr to friend re-declarations of member functions
Mar 7 2018, 11:37 PM
sberg committed rL326990: Propagate DLLAttr to friend re-declarations of member functions.
Propagate DLLAttr to friend re-declarations of member functions
Mar 7 2018, 11:37 PM
sberg closed D16632: clang-cl: Take dllexport from original function decl into account.
Mar 7 2018, 11:37 PM
sberg updated the diff for D16632: clang-cl: Take dllexport from original function decl into account.

Turns out DLLAttr-inherited-from-class is only added to members during Sema::CheckCompletedClass -> Sema::checkClassLevelDLLAttribute, when friend re-decls of those members may already have been created.

Mar 7 2018, 6:17 AM

Jan 5 2018

sberg added a comment to D40720: No -fsanitize=function warning when calling noexcept function through non-noexcept pointer in C++17.

Should this be backported to Clang 6? Not sure how widespread a problem this is in practice (it hit me with LibreOffice).

Jan 5 2018, 12:06 AM · Restricted Project
sberg committed rC321861: Commit new test file forgotten in previous commit.
Commit new test file forgotten in previous commit
Jan 5 2018, 12:01 AM
sberg committed rL321861: Commit new test file forgotten in previous commit.
Commit new test file forgotten in previous commit
Jan 5 2018, 12:01 AM

Jan 4 2018

sberg committed rL321859: No -fsanitize=function warning when calling noexcept function through non….
No -fsanitize=function warning when calling noexcept function through non…
Jan 4 2018, 11:58 PM
sberg committed rL321860: o -fsanitize=function warning when calling noexcept function through non….
o -fsanitize=function warning when calling noexcept function through non…
Jan 4 2018, 11:58 PM
sberg committed rC321859: No -fsanitize=function warning when calling noexcept function through non….
No -fsanitize=function warning when calling noexcept function through non…
Jan 4 2018, 11:58 PM
sberg committed rCRT321860: o -fsanitize=function warning when calling noexcept function through non….
o -fsanitize=function warning when calling noexcept function through non…
Jan 4 2018, 11:58 PM
sberg closed D40720: No -fsanitize=function warning when calling noexcept function through non-noexcept pointer in C++17.
Jan 4 2018, 11:58 PM · Restricted Project
sberg added a comment to D40720: No -fsanitize=function warning when calling noexcept function through non-noexcept pointer in C++17.

friendly ping

Jan 4 2018, 4:58 AM · Restricted Project

Dec 28 2017

sberg updated the diff for D40720: No -fsanitize=function warning when calling noexcept function through non-noexcept pointer in C++17.

made the recommended changes

Dec 28 2017, 4:50 AM · Restricted Project
sberg committed rCRT321518: -fsanitize=vptr warnings on bad static types in dynamic_cast and typeid.
-fsanitize=vptr warnings on bad static types in dynamic_cast and typeid
Dec 28 2017, 4:47 AM
sberg committed rC321519: -fsanitize=vptr warnings on bad static types in dynamic_cast and typeid.
-fsanitize=vptr warnings on bad static types in dynamic_cast and typeid
Dec 28 2017, 4:47 AM
sberg committed rL321519: -fsanitize=vptr warnings on bad static types in dynamic_cast and typeid.
-fsanitize=vptr warnings on bad static types in dynamic_cast and typeid
Dec 28 2017, 4:46 AM
sberg committed rL321518: -fsanitize=vptr warnings on bad static types in dynamic_cast and typeid.
-fsanitize=vptr warnings on bad static types in dynamic_cast and typeid
Dec 28 2017, 4:46 AM
sberg closed D40295: -fsanitize=vptr warnings on bad static types in dynamic_cast and typeid.
Dec 28 2017, 4:46 AM

Dec 21 2017

sberg updated the diff for D40720: No -fsanitize=function warning when calling noexcept function through non-noexcept pointer in C++17.

(need to call getAs<FunctionProtoType> instead of cast<FunctionProtoType> in one place, in case the name in the function decl is wrapped in parens, as happens in HarfBuzz's hb-buffer.cc)

Dec 21 2017, 8:55 AM · Restricted Project
sberg updated the diff for D40720: No -fsanitize=function warning when calling noexcept function through non-noexcept pointer in C++17.

As suggested, solve the issue instead by removing any "noexcept" from the typeinfo emitted for the -fsanitize=function checks.

Dec 21 2017, 4:58 AM · Restricted Project

Dec 20 2017

sberg updated the diff for D40295: -fsanitize=vptr warnings on bad static types in dynamic_cast and typeid.

added a small IR test

Dec 20 2017, 3:01 AM

Dec 19 2017

sberg added a comment to D40720: No -fsanitize=function warning when calling noexcept function through non-noexcept pointer in C++17.
In D40720#958743, @vsk wrote:

Would it be possible to fix this by stripping the noexcept specifiers from both the function type used in the check and the one that is embedded in the prefix data? The downside is that we won't catch the case where the caller has a noexcept specifier and the callee doesn't, but that seems like an edge case to me, and we can think about fixing it in other ways later.

This sounds fine to me, and it avoids breaking the trapping mode.

Dec 19 2017, 5:28 AM · Restricted Project

Dec 18 2017

sberg added a comment to D40720: No -fsanitize=function warning when calling noexcept function through non-noexcept pointer in C++17.
In D40720#958677, @vsk wrote:

Please add a test.

Dec 18 2017, 12:34 PM · Restricted Project
sberg reopened D40720: No -fsanitize=function warning when calling noexcept function through non-noexcept pointer in C++17.

Had to revert r320977/r320978 again with r320981/r320982: "At least http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-android/builds/6013/steps/annotate/logs/stdio complains about
ubsan::ubsan_handle_function_type_mismatch_abort (compiler-rt lib/ubsan/ubsan_handlers.cc) returning now despite being declared 'noreturn', so looks like a different approach is needed for the function_type_mismatch check
to be called also in cases that may ultimately succeed."

Dec 18 2017, 5:59 AM · Restricted Project
sberg committed rL320982: Revert r320978 "No -fsanitize=function warning when calling noexcept function….
Revert r320978 "No -fsanitize=function warning when calling noexcept function…
Dec 18 2017, 5:52 AM
sberg committed rL320981: Revert r320977 "No -fsanitize=function warning when calling noexcept function….
Revert r320977 "No -fsanitize=function warning when calling noexcept function…
Dec 18 2017, 5:52 AM
sberg committed rC320982: Revert r320978 "No -fsanitize=function warning when calling noexcept function….
Revert r320978 "No -fsanitize=function warning when calling noexcept function…
Dec 18 2017, 5:52 AM
sberg committed rCRT320981: Revert r320977 "No -fsanitize=function warning when calling noexcept function….
Revert r320977 "No -fsanitize=function warning when calling noexcept function…
Dec 18 2017, 5:52 AM
sberg committed rCRT320977: No -fsanitize=function warning when calling noexcept function through non….
No -fsanitize=function warning when calling noexcept function through non…
Dec 18 2017, 5:07 AM
sberg committed rL320978: No -fsanitize=function warning when calling noexcept function through non….
No -fsanitize=function warning when calling noexcept function through non…
Dec 18 2017, 5:06 AM
sberg committed rL320977: No -fsanitize=function warning when calling noexcept function through non….
No -fsanitize=function warning when calling noexcept function through non…
Dec 18 2017, 5:06 AM
sberg committed rC320978: No -fsanitize=function warning when calling noexcept function through non….
No -fsanitize=function warning when calling noexcept function through non…
Dec 18 2017, 5:06 AM
sberg closed D40720: No -fsanitize=function warning when calling noexcept function through non-noexcept pointer in C++17.
Dec 18 2017, 5:06 AM · Restricted Project

Dec 13 2017

sberg added a comment to D40720: No -fsanitize=function warning when calling noexcept function through non-noexcept pointer in C++17.

friendly ping

Dec 13 2017, 3:42 AM · Restricted Project
sberg added a comment to D40295: -fsanitize=vptr warnings on bad static types in dynamic_cast and typeid.

friendly ping; any input on my two questions maybe?

Dec 13 2017, 3:41 AM

Dec 8 2017

sberg committed rL320135: In stdbool.h, define bool, false, true only in gnu++98.
In stdbool.h, define bool, false, true only in gnu++98
Dec 8 2017, 12:28 AM
sberg committed rC320135: In stdbool.h, define bool, false, true only in gnu++98.
In stdbool.h, define bool, false, true only in gnu++98
Dec 8 2017, 12:28 AM
sberg closed D40167: In stdbool.h, define bool, false, true only in gnu++98 by committing rC320135: In stdbool.h, define bool, false, true only in gnu++98.
Dec 8 2017, 12:28 AM

Dec 1 2017

sberg updated the diff for D40720: No -fsanitize=function warning when calling noexcept function through non-noexcept pointer in C++17.

(Diff 125121 had accidentally contained a spurious "}". Fixed that now.)

Dec 1 2017, 8:36 AM · Restricted Project
sberg created D40720: No -fsanitize=function warning when calling noexcept function through non-noexcept pointer in C++17.
Dec 1 2017, 6:19 AM · Restricted Project

Nov 30 2017

sberg committed rCRT319412: Linux needs to include sys/uio.h for readv, preadv.
Linux needs to include sys/uio.h for readv, preadv
Nov 30 2017, 1:23 AM
sberg committed rL319412: Linux needs to include sys/uio.h for readv, preadv.
Linux needs to include sys/uio.h for readv, preadv
Nov 30 2017, 1:22 AM

Nov 24 2017

sberg updated the diff for D40295: -fsanitize=vptr warnings on bad static types in dynamic_cast and typeid.

Oh, I'd meant to upload the version of the patch where the newly added calls to EmitTypeCheck use the default Alignment and SkippedChecks arguments, instead of explicitly skipping Alignment and ObjectSize checks. (That's the version I had successfully used in a LibreOffice UBSan 'make check' test build. But I still don't know which version is better.)

Nov 24 2017, 3:22 AM

Nov 21 2017

sberg added a comment to D40295: -fsanitize=vptr warnings on bad static types in dynamic_cast and typeid.

Some items I'm unclear about:

Nov 21 2017, 4:43 AM
sberg created D40295: -fsanitize=vptr warnings on bad static types in dynamic_cast and typeid.
Nov 21 2017, 4:39 AM

Nov 17 2017

sberg committed rL318530: Indent code blocks so they are actually treated as such.
Indent code blocks so they are actually treated as such
Nov 17 2017, 8:35 AM
sberg created D40167: In stdbool.h, define bool, false, true only in gnu++98.
Nov 17 2017, 12:05 AM
sberg added a comment to D40167: In stdbool.h, define bool, false, true only in gnu++98.

(This code had been introduced with http://llvm.org/viewvc/llvm-project?view=revision&revision=115028 "Define _Bool, bool, true, and false macros in <stdbool.h> when we're in a GNU-compatible C++ dialect. Fixes rdar://problem/8477819" mentioning: "Fixes rdar://problem/8477819." But I don't know what that is.)

Nov 17 2017, 12:05 AM

Nov 13 2017

sberg committed rL318043: Remove excess whitespace from syslog message; NFC.
Remove excess whitespace from syslog message; NFC
Nov 13 2017, 7:40 AM

Sep 20 2017

sberg added inline comments to D38055: Tighten the invariants around LoopBase::invalidate.
Sep 20 2017, 11:52 PM
sberg added inline comments to D38055: Tighten the invariants around LoopBase::invalidate.
Sep 20 2017, 12:40 AM

Sep 15 2017

sberg added a comment to D36870: [libcxx] Add missing __cxa_deleted_virtual.

Because libc++ doesn't actually have any instances of deleted virtual functions within the library __cxa_deleted_vilrtual is never used, and hence never exported on Linux.
We do, however, have pure virtual functions, so __cxa_pure_virtual is exported transitively. On Linux we don't use the explicit export lists, so this change didn't change the Linux ABI.

Sep 15 2017, 12:59 AM
sberg added a comment to D36870: [libcxx] Add missing __cxa_deleted_virtual.

...but I'm still curious as to why lib/abi/x86_64-unknown-linux-gnu.abilist should want to mention __cxa_pure_virtual but not __cxa_deleted_virtual

Sep 15 2017, 12:34 AM

Sep 13 2017

sberg updated the diff for D36870: [libcxx] Add missing __cxa_deleted_virtual.

Drop changes of files under lib/abi/<version>.

Sep 13 2017, 11:29 PM

Sep 11 2017

sberg added inline comments to D36870: [libcxx] Add missing __cxa_deleted_virtual.
Sep 11 2017, 2:45 AM

Aug 18 2017

sberg created D36870: [libcxx] Add missing __cxa_deleted_virtual.
Aug 18 2017, 4:33 AM
sberg updated the diff for D35564: Suppress -pedantic warnings about GNU extension StmtExpr in glibc's assert macro.

(the original diff had inadvertently lacked full -U999999 context; uploaded a new diff)

Aug 18 2017, 1:58 AM
sberg updated the diff for D35562: Support GNU extension StmtExpr in constexpr function.

(the original diff had inadvertently lacked full -U999999 context; uploaded a new diff)

Aug 18 2017, 1:57 AM

Jul 18 2017

sberg created D35564: Suppress -pedantic warnings about GNU extension StmtExpr in glibc's assert macro.
Jul 18 2017, 8:04 AM
sberg created D35562: Support GNU extension StmtExpr in constexpr function.
Jul 18 2017, 7:47 AM