From cfe-users at lists.llvm.org Thu Jul 6 13:23:46 2017 From: cfe-users at lists.llvm.org (Sam Elliott via cfe-users) Date: Thu, 6 Jul 2017 13:23:46 -0700 Subject: [cfe-users] Using -fsanitize=safe-stack compiler/linker flag In-Reply-To: <812E2949-D3D2-41D8-AE81-29CA5F6DC913@filemaker.com> References: <812E2949-D3D2-41D8-AE81-29CA5F6DC913@filemaker.com> Message-ID: If you built clang yourself, you'll need compiler-rt to link against. If you installed clang through a package manager check that compiler-rt is part of the package you obtained. Sam > On 26 Jun 2017, at 3:06 pm, Alex Chen via cfe-users wrote: > > I am using clang 3.8.0 and gcc 6.2.1 on CentOS 7.3. Everything works fine until I add ‘-fsanitize=safe-stack’ to the compiler and linker flags. > The shared libraries are built fine but executables linking with these libraries cannot be generated due to a unresolved symbol __safestack_unsaft_stack_ptr. > Is this because that symbol is only available in Clang’s libc++ runtime library but not in gcc’s libstdc++? > > > Alex Chen > > _______________________________________________ > cfe-users mailing list > cfe-users at lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-users -- Archibald Sam Elliott ashe2 at cs.washington.edu PhD Student, PLSE Group -------------- next part -------------- An HTML attachment was scrubbed... URL: From cfe-users at lists.llvm.org Wed Jul 26 16:38:40 2017 From: cfe-users at lists.llvm.org (Archibald Samuel Elliott via cfe-users) Date: Wed, 26 Jul 2017 16:38:40 -0700 Subject: [cfe-users] C11, -Wunsequenced and aliasing Message-ID: <40475100-FC88-46E5-960B-6223BDC268D6@cs.washington.edu> Hi Clang-users! What are the expectations for the -Wunsequenced warning in Clang with C11? My understanding was the following expression would be unsequenced according to the spec, but clang doesn't give me a warning: ((*p = 3) + (*q = 4)) Is clang only going to warn if it knows p and q definitely alias each other here? I also tried the expression: ((*p = 3) + (*p = 4)) Which also gave no warnings, despite p aliasing itself. Is the warning based on a heuristic of whether the unsequenced behaviour will be observable, or on whether the two assignments ever alias, or will it only warn if it knows two side-effecting expressions are definitely unsequenced? Maybe this kind of analysis isn't for clang, and instead is for the clang static analyser. Thank you in advance! Sam From cfe-users at lists.llvm.org Thu Jul 27 12:33:09 2017 From: cfe-users at lists.llvm.org (Cyndy Ishida via cfe-users) Date: Thu, 27 Jul 2017 19:33:09 +0000 Subject: [cfe-users] [analyzer] clang analyzer flag vs scan build Message-ID: <7aa494e282cd400bb16420eb55b7a362@CMKWSCTSMAIL01.kcg.com> Hi, I was trying to integrate the static analysis tools into a few of my projects. I started using scan-build, and couldn't get it working on larger projects, even after exporting CXX & CC variables. It just always reported 'no bugs found'. Using clang++ --analyze, I was able to see warning messages. On the smaller projects, I noticed that the errors were the same for both the compiler argument(--analyze) and the scan-build command. Would anyone know if and how they would incur different warning reports? Thanks! -Cyndy Ishida This message, including any attachments, is intended only for the personal and confidential use of the designated recipient(s) to which it is addressed. This communication may contain information that constitutes attorney work product, is privileged, confidential or otherwise protected from disclosure. If the reader of this message is not the designated recipient, you are hereby notified that you have received this communication in error, and that any review, dissemination, retention, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify us by telephone at +1 212 418 0113 or by e-mail reply to the sender, and discard any paper copies and delete all electronic files of this communication. Virtu Financial LLC. -------------- next part -------------- An HTML attachment was scrubbed... URL: From cfe-users at lists.llvm.org Mon Jul 31 09:50:20 2017 From: cfe-users at lists.llvm.org (Anna Zaks via cfe-users) Date: Mon, 31 Jul 2017 09:50:20 -0700 Subject: [cfe-users] [analyzer] clang analyzer flag vs scan build In-Reply-To: <7aa494e282cd400bb16420eb55b7a362@CMKWSCTSMAIL01.kcg.com> References: <7aa494e282cd400bb16420eb55b7a362@CMKWSCTSMAIL01.kcg.com> Message-ID: <613D3739-7B43-4FAD-AB0C-1AA0996464F1@apple.com> I would recommend looking at the build script to see if there are any errors and if the source files where you expect errors to occur are being analyzed. (If it’s a makefile project, do not forget to run scan-build configure.) Cheers, Anna > On Jul 27, 2017, at 12:33 PM, Cyndy Ishida via cfe-users wrote: > > Hi, > > I was trying to integrate the static analysis tools into a few of my projects. > I started using scan-build, and couldn’t get it working on larger projects, even after exporting CXX & CC variables. > It just always reported ‘no bugs found’. > Using clang++ --analyze, I was able to see warning messages. > > On the smaller projects, I noticed that the errors were the same for both the compiler argument(--analyze) and the scan-build command. > Would anyone know if and how they would incur different warning reports? > > > Thanks! > -Cyndy Ishida > This message, including any attachments, is intended only for the personal and confidential use of the designated recipient(s) to which it is addressed. This communication may contain information that constitutes attorney work product, is privileged, confidential or otherwise protected from disclosure. If the reader of this message is not the designated recipient, you are hereby notified that you have received this communication in error, and that any review, dissemination, retention, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify us by telephone at +1 212 418 0113 or by e-mail reply to the sender, and discard any paper copies and delete all electronic files of this communication. Virtu Financial LLC.  _______________________________________________ > cfe-users mailing list > cfe-users at lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-users -------------- next part -------------- An HTML attachment was scrubbed... URL: