Hi all!
Attached are updated copies of the patches, previous ones no longer
apply cleanly to ToT.
Also cleaned up the clang patch a bit.
Enjoy, feedback/review requested :).
~Will
On Tue, Oct 28, 2014 at 7:42 PM, Will Dietz wdie...@illinois.edu wrote:
Hi all,
Attached are updated patches
://wdtz.org/catching-pointer-overflow-bugs.html
[2] http://wdtz.org/undefined-behavior-in-binutils-causes-segfault.html
[3] http://llvm.org/viewvc/llvm-project?view=revisionrevision=216385
[4] https://trac.ffmpeg.org/ticket/3152
~Will
On Mon, Nov 18, 2013 at 11:13 PM, Will Dietz wdie...@illinois.edu
Thanks, apologies for the breakage!
I'll review the Coding standards regarding the C++11 changes carefully... :).
~Will
On Tue, Aug 26, 2014 at 12:05 PM, Aaron Ballman aa...@aaronballman.com wrote:
Author: aaronballman
Date: Tue Aug 26 12:05:57 2014
New Revision: 216463
URL:
Author: wdietz2
Date: Mon Aug 25 11:09:51 2014
New Revision: 216385
URL: http://llvm.org/viewvc/llvm-project?rev=216385view=rev
Log:
ASTVector: Fix return value of various insert() methods.
Error caught using -fsanitize=pointer-overflow.
Expand ASTVectorTest to verify basic behavior,
test fails
- this-begin();
if (I == this-end()) { // Important special case for empty vector.
append(C, NumToInsert, Elt);
- return this-begin() + InsertElt;
+ return this-begin();
}
LGTM with one more test case for the above.
On Thu, Aug 21, 2014 at 4:17 PM, Will Dietz wdie
for more thorough
testing in the future should someone tackle such a task :).
Please let me know okay to commit or if there's any questions or comments :).
Thanks!
~Will
On Tue, Nov 19, 2013 at 9:18 AM, Will Dietz wdie...@illinois.edu wrote:
Closest we have is a test to ensure ASTVector compiles
. It'd be nice to have test coverage for this that doesn't
require running a sanitizer. Do we have any direct tests for ASTVector?
On Mon, Nov 18, 2013 at 9:35 PM, Will Dietz wdie...@illinois.edu wrote:
Ping! :)
~Will
On Mon, Nov 4, 2013 at 4:32 PM, Will Dietz wdie...@illinois.edu wrote:
Ping
in catching bugs in LLVM and
elsewhere, as previously reported.
Thanks!
~Will
On Mon, Oct 28, 2013 at 7:56 PM, Will Dietz wdie...@illinois.edu wrote:
Glad there's some interest.
I have no test coverage of anything other than the Driver component,
that will be included.
I also need to do some
Ping! :)
~Will
On Mon, Nov 4, 2013 at 4:32 PM, Will Dietz wdie...@illinois.edu wrote:
Ping.
It's easy to get clang to trigger this bug which results in an invalid
iterator to be returned (which the current code happens to ignore, but
that's just a lucky coincidence), as this regularly
: Will Dietz w...@wdtz.org
Date: Thu, 7 Nov 2013 15:27:03 -0600
Subject: [PATCH] ubsan: Only emit constants for filenames and type descriptors
once.
Produces neater IR in significantly less time.
(~18% faster -O0 compile time for sqlite3 with -fsanitize=undefined)
---
lib/CodeGen/CGExpr.cpp
Looks like this is unnecessary and was actually only temporarily
broken by r193528, which was reverted quickly and fixed shortly
thereafter in r193554 and others.
AFAICT --no-add-needed is not used by default, so it seems the
default handling for an unknown target is appropriate.
Thanks for the
Author: wdietz2
Date: Thu Nov 7 19:09:22 2013
New Revision: 194231
URL: http://llvm.org/viewvc/llvm-project?rev=194231view=rev
Log:
ubsan: Only emit constants for filenames and type descriptors once.
Produces neater IR in significantly less time.
(~18% faster -O0 compile time for sqlite3 with
My pleasure :).
r194231, thanks!
~Will
On Thu, Nov 7, 2013 at 7:07 PM, Richard Smith rich...@metafoo.co.uk wrote:
On Thu, Nov 7, 2013 at 3:34 PM, Will Dietz wdie...@illinois.edu wrote:
Produces neater IR in significantly less time.
(~18% faster -O0 compile time for sqlite3 with -fsanitize
a simple dummy
ASTContext for testing? As noted in
the commit that originally added ASTVectorTest.cpp (r186253) this
blocks the creation of even basic
functionality tests for this data structure.
~Will
On Mon, Oct 28, 2013 at 5:11 PM, Will Dietz wdie...@illinois.edu wrote:
Error caught -fsanitize
] Patches coming soon.
[2] See the implementation of append(), for example.
From d89275825fdfa88c78719df5489433277e56e735 Mon Sep 17 00:00:00 2001
From: Will Dietz w...@wdtz.org
Date: Mon, 28 Oct 2013 08:10:34 -0500
Subject: [PATCH] ASTVector: Fix return value of various insert() methods.
Error caught
See attached, thanks!
~Will
From 13bc7bb6b76cd884469004f864e5f53803554350 Mon Sep 17 00:00:00 2001
From: Will Dietz w...@wdtz.org
Date: Mon, 28 Oct 2013 16:49:43 -0500
Subject: [PATCH] Fix toolchain detection on SL6.
* Add SL6 Distro type, detect from /etc/redhat-release
* Ignore /etc/lsb
bugs! :)
~Will
[1] http://wdtz.org/undefined-behavior-in-binutils-causes-segfault.html
[2]
http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20131028/091878.html
From bf46609c78ccdd27253dcaeee39ffcac7a156456 Mon Sep 17 00:00:00 2001
From: Will Dietz w...@wdtz.org
Date: Sun, 27 Oct 2013
on large codebases? Does this find many bugs? (I
can imagine it would be effective when combined with fuzz testing...)
On Mon, Oct 28, 2013 at 3:39 PM, Will Dietz wdie...@illinois.edu wrote:
Hi all,
Recently I thought it would be useful to have a sanitizer for
detecting overflows in pointer
Author: wdietz2
Date: Tue Oct 15 10:45:00 2013
New Revision: 192713
URL: http://llvm.org/viewvc/llvm-project?rev=192713view=rev
Log:
ModuleAssistant: Fix warning, don't return bool as a pointer.
No functionality change intended.
Modified:
See attached.
This is important to avoid warning twice on shifts that fail both
checks, like 1 -1.
The branching is done to avoid executing the second check's shift with
invalid operands (poisoning the result), especially since we already
know the shift is invalid.
Thanks!
~Will
Author: wdietz2
Date: Mon Feb 25 16:37:49 2013
New Revision: 176056
URL: http://llvm.org/viewvc/llvm-project?rev=176056view=rev
Log:
[ubsan] Emit single check for left shift.
Avoids warning twice on same shift.
Modified:
cfe/trunk/lib/CodeGen/CGExprScalar.cpp
at 1:02 PM, Will Dietz wdie...@illinois.edu wrote:
See attached.
This is important to avoid warning twice on shifts that fail both
checks, like 1 -1.
The branching is done to avoid executing the second check's shift with
invalid operands (poisoning the result), especially since we already
On Mon, Jan 28, 2013 at 7:10 PM, Richard Smith rich...@metafoo.co.uk wrote:
On Mon, Jan 28, 2013 at 5:01 PM, Will Dietz wdie...@uiuc.edu wrote:
Glad this is going in, although I would prefer to see compiler-rt
become more widely used (shipped by default, etc) instead. However,
that's
Glad this is going in, although I would prefer to see compiler-rt
become more widely used (shipped by default, etc) instead. However,
that's not the case yet and it's good to make these checks available
to users that either don't want to or can't use it (kernel work, no
compiler-rt readily
, due to try to match whole DOSish path without escaping with
Regex.
Two tests have been suppressed on win32 since r172820, FYI.
...Takumi
2013/1/18 Will Dietz wdie...@illinois.edu:
Committed as r172806 (llvm) and r172808 (clang). Thanks!
~Will
On Fri, Jan 18, 2013 at 2:28 AM, Alexey
Author: wdietz2
Date: Fri Jan 18 05:30:38 2013
New Revision: 172808
URL: http://llvm.org/viewvc/llvm-project?rev=172808view=rev
Log:
[ubsan] Add support for -fsanitize-blacklist
Added:
cfe/trunk/test/CodeGen/ubsan-blacklist.c
Modified:
cfe/trunk/include/clang/Basic/LangOptions.def
this look OK from your end?
On Thu, Jan 17, 2013 at 8:53 AM, Will Dietz wdie...@illinois.edu wrote:
Great, thank you both for your feedback. I also agree the approach
originally submitted was messy, and Richard you nailed the conflict
that drove me to accept it. Thank you for giving me a better
Attached are two patches.
First applies to clang and uses the blacklist to avoid instrumenting
the source files or functions specified. Lit test included.
The other is a small change to llvm to make the Blacklist class
visible to Clang. Not sure I understand the header organization
system well
Minor touchup to clang patch, thanks!
~Will
On Wed, Jan 16, 2013 at 11:37 AM, Will Dietz wdie...@illinois.edu wrote:
Attached are two patches.
First applies to clang and uses the blacklist to avoid instrumenting
the source files or functions specified. Lit test included.
The other
On Mon, Jan 14, 2013 at 1:27 AM, Alexey Samsonov samso...@google.com wrote:
On Wed, Jan 9, 2013 at 6:01 AM, Will Dietz wdie...@illinois.edu wrote:
On Tue, Jan 8, 2013 at 3:02 PM, Richard Smith rich...@metafoo.co.uk
wrote:
On Tue, Jan 8, 2013 at 12:21 AM, Will Dietz wdie...@illinois.edu
Please see attached.
~Will
0001-ToolChains-Minor-touchup-to-use-correct-type-avoid-t.patch
Description: Binary data
___
cfe-commits mailing list
cfe-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
Heh, agreed.
r172127, thanks!
~Will
On Thu, Jan 10, 2013 at 4:19 PM, Richard Smith rich...@metafoo.co.uk wrote:
It would be alarming if this made a difference in practice, but LGTM
On Thu, Jan 10, 2013 at 2:13 PM, Will Dietz wdie...@uiuc.edu wrote:
Please see attached
Author: wdietz2
Date: Thu Jan 10 16:20:02 2013
New Revision: 172127
URL: http://llvm.org/viewvc/llvm-project?rev=172127view=rev
Log:
ToolChains: Minor touchup to use correct type, avoid truncation.
Truncation happens regularly when find_first_not_of returns npos,
strings long enough to trigger
Sorry about that!
Can you apply the attached patch (patch -p1 patchfile) and confirm
this fixes the issue for you?
Thanks!
~Will
On Wed, Jan 9, 2013 at 8:08 AM, İsmail Dönmez ism...@donmez.ws wrote:
Hi;
On Mon, Jan 7, 2013 at 11:25 PM, Will Dietz wdie...@illinois.edu wrote:
Author
Poor internet here, my apologies for skipping a message in the thread.
Can you check if this still fails on trunk as Dmitri suggested?
Thanks!
~Will
On Wed, Jan 9, 2013 at 1:48 PM, Will Dietz wdie...@illinois.edu wrote:
Sorry about that!
Can you apply the attached patch (patch -p1
duplicate
overflows. Does this seem valid to you? It's the primary reason for
having any of the non-atomic accesses to the Columns field in this
code.
Thank you for your time,
~Will
On Mon, Jan 7, 2013 at 3:17 PM, Will Dietz wdie...@illinois.edu wrote:
Updated, slightly neater patches attached
On Tue, Jan 8, 2013 at 3:02 PM, Richard Smith rich...@metafoo.co.uk wrote:
On Tue, Jan 8, 2013 at 12:21 AM, Will Dietz wdie...@illinois.edu wrote:
Thanks for taking a look. Responses inline.
On Mon, Jan 7, 2013 at 10:16 PM, Richard Smith rich...@metafoo.co.uk wrote:
Thanks! This patch
Author: wdietz2
Date: Tue Jan 8 21:39:41 2013
New Revision: 171947
URL: http://llvm.org/viewvc/llvm-project?rev=171947view=rev
Log:
[ubsan] Make static check data non-const so it can be used for deduplication.
Modified:
cfe/trunk/lib/CodeGen/CGExpr.cpp
On Tue, Jan 8, 2013 at 9:46 PM, Eli Friedman eli.fried...@gmail.com wrote:
On Tue, Jan 8, 2013 at 7:39 PM, Will Dietz wdie...@illinois.edu wrote:
Author: wdietz2
Date: Tue Jan 8 21:39:41 2013
New Revision: 171947
URL: http://llvm.org/viewvc/llvm-project?rev=171947view=rev
Log:
[ubsan
Author: wdietz2
Date: Mon Jan 7 03:51:17 2013
New Revision: 171718
URL: http://llvm.org/viewvc/llvm-project?rev=171718view=rev
Log:
CFG.cpp: Fix wrapping logic when printing block preds/succs.
First check only wrapped with i==8, second wrapped at i==2,8,18,28,...
This fix restores the intended
Ping :).
Updated patches for ToT attached.
~Will
On Sun, Dec 30, 2012 at 4:13 PM, Will Dietz wdie...@uiuc.edu wrote:
Thanks for the feedback, updated patches attached. Moved regression
test to clang, and also fix similar issue with /= using the wrong
type.
On Sun, Dec 30, 2012 at 2:48 AM
Author: wdietz2
Date: Mon Jan 7 16:25:52 2013
New Revision: 171801
URL: http://llvm.org/viewvc/llvm-project?rev=171801view=rev
Log:
[ubsan] Use correct type for compound assignment ops.
Added:
cfe/trunk/test/CodeGen/compound-assign-overflow.c
Modified:
Updated, slightly neater patches attached.
Thanks!
~Will
On Tue, Jan 1, 2013 at 9:49 PM, Will Dietz wdie...@illinois.edu wrote:
Updated to apply cleanly to latest clang/compiler-rt.
Thanks!
~Will
On Sun, Dec 30, 2012 at 6:22 PM, Will Dietz wdie...@illinois.edu wrote:
(Moving to cfe
Updated to apply cleanly to latest clang/compiler-rt.
Thanks!
~Will
On Sun, Dec 30, 2012 at 6:22 PM, Will Dietz wdie...@illinois.edu wrote:
(Moving to cfe-commits@, was previously:
http://lists.cs.uiuc.edu/pipermail/cfe-dev/2012-December/026519.html)
Please see attached! :)
Thank you
Attached, testcase included.
Found with -fsanitize=integer.
~Will
0001-CFG.cpp-Fix-wrapping-logic-when-printing-block-preds.patch
Description: Binary data
___
cfe-commits mailing list
cfe-commits@cs.uiuc.edu
See attached. Minor code touchup, no externally-visible functionality change.
Assert added causes major check-clang failures without the
corresponding code change in the patch.
Found with -fsanitize=integer.
~Will
0001-DiagnosticIds-Fix-offset-ID-calculation-no-impact-ou.patch
Description:
See attached patches, thanks!
Description:
When checking a += b we were using the type of 'a' in the
diagnostic, instead of the type of the overflowing expression a+b.
This was particularly problematic when 'a' was signed and 'b' was
unsigned.
Okay to commit?
~Will
Author: wdietz2
Date: Sun Dec 30 14:53:28 2012
New Revision: 171264
URL: http://llvm.org/viewvc/llvm-project?rev=171264view=rev
Log:
[ubsan] Recover by default, use -fno-sanitize-recover to disable.
Modified:
cfe/trunk/include/clang/Driver/CC1Options.td
refactor Clang's IRGen without running the compiler-rt tests).
Understood, thanks for the explanation. Makes good sense.
On Sun, Dec 30, 2012 at 12:13 AM, Will Dietz wdie...@uiuc.edu wrote:
See attached patches, thanks!
Description:
When checking a += b we were using the type
(Moving to cfe-commits@, was previously:
http://lists.cs.uiuc.edu/pipermail/cfe-dev/2012-December/026519.html)
Please see attached! :)
Thank you,
~Will
0001-ubsan-Add-deduplication-functionality-always-enabled.patch
Description: Binary data
Author: wdietz2
Date: Fri Dec 14 19:39:14 2012
New Revision: 170263
URL: http://llvm.org/viewvc/llvm-project?rev=170263view=rev
Log:
[ubsan] Emit branch weight metadata to hint towards common case.
Results in better block placement that helps close the
performance gap when making ubsan checks
Author: wdietz2
Date: Sun Dec 2 13:50:33 2012
New Revision: 169114
URL: http://llvm.org/viewvc/llvm-project?rev=169114view=rev
Log:
[ubsan] Add flag to enable recovery from checks when possible.
Added:
cfe/trunk/test/CodeGen/sanitize-recover.c
Modified:
Author: wdietz2
Date: Tue Nov 27 09:01:55 2012
New Revision: 168701
URL: http://llvm.org/viewvc/llvm-project?rev=168701view=rev
Log:
Add -fsanitize=integer for reporting suspicious integer behaviors.
Introduces new sanitizer unsigned-integer-overflow.
Added:
53 matches
Mail list logo