[PATCH] D40720: No -fsanitize=function warning when calling noexcept function through non-noexcept pointer in C++17

2019-02-08 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno added a comment. Herald added a project: clang. It seems to be causing https://bugs.llvm.org/show_bug.cgi?id=40658. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D40720/new/ https://reviews.llvm.org/D40720

[PATCH] D40720: No -fsanitize=function warning when calling noexcept function through non-noexcept pointer in C++17

2018-01-05 Thread Stephan Bergmann via Phabricator via cfe-commits
sberg added a comment. Should this be backported to Clang 6? Not sure how widespread a problem this is in practice (it hit me with LibreOffice). Repository: rC Clang https://reviews.llvm.org/D40720 ___ cfe-commits mailing list

[PATCH] D40720: No -fsanitize=function warning when calling noexcept function through non-noexcept pointer in C++17

2018-01-04 Thread Stephan Bergmann via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC321859: No -fsanitize=function warning when calling noexcept function through non… (authored by sberg, committed by ). Changed prior to commit: https://reviews.llvm.org/D40720?vs=128289=128710#toc

[PATCH] D40720: No -fsanitize=function warning when calling noexcept function through non-noexcept pointer in C++17

2018-01-04 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith accepted this revision. rsmith added a comment. This revision is now accepted and ready to land. LGTM, thank you! https://reviews.llvm.org/D40720 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D40720: No -fsanitize=function warning when calling noexcept function through non-noexcept pointer in C++17

2018-01-04 Thread Stephan Bergmann via Phabricator via cfe-commits
sberg added a comment. friendly ping any further input, or should I consider this good enough to go in now? https://reviews.llvm.org/D40720 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D40720: No -fsanitize=function warning when calling noexcept function through non-noexcept pointer in C++17

2017-12-28 Thread Stephan Bergmann via Phabricator via cfe-commits
sberg updated this revision to Diff 128289. sberg added a comment. made the recommended changes https://reviews.llvm.org/D40720 Files: clang/include/clang/AST/ASTContext.h clang/lib/AST/ASTContext.cpp clang/lib/CodeGen/CGExpr.cpp clang/lib/CodeGen/CodeGenFunction.cpp

[PATCH] D40720: No -fsanitize=function warning when calling noexcept function through non-noexcept pointer in C++17

2017-12-21 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: clang/lib/CodeGen/CodeGenTypes.h:378 + /// specification removed. + QualType removeNothrowQualification(const FunctionProtoType *Proto) const; }; Please use the frontend language terminology here: "nothrow" is

[PATCH] D40720: No -fsanitize=function warning when calling noexcept function through non-noexcept pointer in C++17

2017-12-21 Thread Stephan Bergmann via Phabricator via cfe-commits
sberg updated this revision to Diff 127899. sberg added a comment. (need to call getAs instead of cast in one place, in case the name in the function decl is wrapped in parens, as happens in HarfBuzz's hb-buffer.cc) https://reviews.llvm.org/D40720 Files: clang/lib/CodeGen/CGExpr.cpp

[PATCH] D40720: No -fsanitize=function warning when calling noexcept function through non-noexcept pointer in C++17

2017-12-21 Thread Stephan Bergmann via Phabricator via cfe-commits
sberg updated this revision to Diff 127863. sberg added a comment. As suggested, solve the issue instead by removing any "noexcept" from the typeinfo emitted for the -fsanitize=function checks. https://reviews.llvm.org/D40720 Files: clang/lib/CodeGen/CGExpr.cpp

[PATCH] D40720: No -fsanitize=function warning when calling noexcept function through non-noexcept pointer in C++17

2017-12-19 Thread Stephan Bergmann via Phabricator via cfe-commits
sberg added a comment. In https://reviews.llvm.org/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

[PATCH] D40720: No -fsanitize=function warning when calling noexcept function through non-noexcept pointer in C++17

2017-12-18 Thread Vedant Kumar via Phabricator via cfe-commits
vsk added a comment. In https://reviews.llvm.org/D40720#958697, @sberg wrote: > In https://reviews.llvm.org/D40720#958677, @vsk wrote: > > > Please add a test. > > > Note that the bot upon the first closing of this review changed the shown > diff from the combined cfe+compiler-rt diff to just

[PATCH] D40720: No -fsanitize=function warning when calling noexcept function through non-noexcept pointer in C++17

2017-12-18 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc added a comment. 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

[PATCH] D40720: No -fsanitize=function warning when calling noexcept function through non-noexcept pointer in C++17

2017-12-18 Thread Stephan Bergmann via Phabricator via cfe-commits
sberg added a comment. In https://reviews.llvm.org/D40720#958677, @vsk wrote: > Please add a test. Note that the bot upon the first closing of this review changed the shown diff from the combined cfe+compiler-rt diff to just the cfe part. See https://reviews.llvm.org/rL320977 for the

[PATCH] D40720: No -fsanitize=function warning when calling noexcept function through non-noexcept pointer in C++17

2017-12-18 Thread Vedant Kumar via Phabricator via cfe-commits
vsk added a comment. Copying my comment from the diffusion thread to keep things in one place: > You could make FunctionTypeMismatch an 'AlwaysRecoverable' check, just like > the Vptr check, and remove the _abort handlers from the ubsan runtimes. Repository: rC Clang

[PATCH] D40720: No -fsanitize=function warning when calling noexcept function through non-noexcept pointer in C++17

2017-12-18 Thread Vedant Kumar via Phabricator via cfe-commits
vsk added a comment. Please add a test. Repository: rC Clang https://reviews.llvm.org/D40720 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D40720: No -fsanitize=function warning when calling noexcept function through non-noexcept pointer in C++17

2017-12-18 Thread Stephan Bergmann via Phabricator via cfe-commits
sberg reopened this revision. sberg added a comment. 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

[PATCH] D40720: No -fsanitize=function warning when calling noexcept function through non-noexcept pointer in C++17

2017-12-18 Thread Stephan Bergmann via Phabricator via cfe-commits
This revision was not accepted when it landed; it landed in state "Needs Review". This revision was automatically updated to reflect the committed changes. Closed by commit rC320978: No -fsanitize=function warning when calling noexcept function through non… (authored by sberg, committed by ).

[PATCH] D40720: No -fsanitize=function warning when calling noexcept function through non-noexcept pointer in C++17

2017-12-13 Thread Stephan Bergmann via Phabricator via cfe-commits
sberg added a comment. friendly ping https://reviews.llvm.org/D40720 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D40720: No -fsanitize=function warning when calling noexcept function through non-noexcept pointer in C++17

2017-12-01 Thread Stephan Bergmann via Phabricator via cfe-commits
sberg updated this revision to Diff 125152. sberg added a comment. (Diff 125121 had accidentally contained a spurious "}". Fixed that now.) https://reviews.llvm.org/D40720 Files: clang/lib/CodeGen/CGExpr.cpp compiler-rt/lib/ubsan/ubsan_handlers.cc compiler-rt/lib/ubsan/ubsan_handlers.h

[PATCH] D40720: No -fsanitize=function warning when calling noexcept function through non-noexcept pointer in C++17

2017-12-01 Thread Stephan Bergmann via Phabricator via cfe-commits
sberg created this revision. Herald added a subscriber: kubamracek. As discussed in the mail thread https://groups.google.com/a/isocpp.org/forum/#!topic/std-discussion/T64_dW3WKUk "Calling noexcept function throug non-noexcept pointer is undefined behavior?", such a call should not be UB.