public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug sanitizer/58718] New: Invalid check in libsanitizer
@ 2013-10-14 6:02 y.gribov at samsung dot com
2013-10-14 6:03 ` [Bug sanitizer/58718] " y.gribov at samsung dot com
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: y.gribov at samsung dot com @ 2013-10-14 6:02 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58718
Bug ID: 58718
Summary: Invalid check in libsanitizer
Product: gcc
Version: 4.9.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: sanitizer
Assignee: unassigned at gcc dot gnu.org
Reporter: y.gribov at samsung dot com
CC: dodji at gcc dot gnu.org, dvyukov at gcc dot gnu.org,
jakub at gcc dot gnu.org, kcc at gcc dot gnu.org
Created attachment 30998
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30998&action=edit
Repro
I've recently tried to run AddressSanitizer with malloc_context_size=0 runtime
option to speedup execution of my program. I got nice perf improvements but
also an internal abort in asan_allocator2.cc when it tried to report heap
overflow warning:
0x60040000e004 is located 4 bytes to the right of 16-byte region
[0x60040000dff0,0x60040000e000)
==3488== AddressSanitizer CHECK failed:
/home/ygribov/gcc/gcc-master/libsanitizer/asan/asan_allocator2.cc:216 "((id))
!= (0)" (0x0, 0x0)
If I unset ASAN_OPTIONS, warning is reported correctly.
-Y
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug sanitizer/58718] Invalid check in libsanitizer
2013-10-14 6:02 [Bug sanitizer/58718] New: Invalid check in libsanitizer y.gribov at samsung dot com
@ 2013-10-14 6:03 ` y.gribov at samsung dot com
2013-10-14 6:36 ` y.gribov at samsung dot com
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: y.gribov at samsung dot com @ 2013-10-14 6:03 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58718
--- Comment #1 from Yury Gribov <y.gribov at samsung dot com> ---
Created attachment 30999
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30999&action=edit
Proposed patch
It seems that this CHECK should be removed to allow disabling malloc tracing.
Patch is attached.
-Y
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug sanitizer/58718] Invalid check in libsanitizer
2013-10-14 6:02 [Bug sanitizer/58718] New: Invalid check in libsanitizer y.gribov at samsung dot com
2013-10-14 6:03 ` [Bug sanitizer/58718] " y.gribov at samsung dot com
@ 2013-10-14 6:36 ` y.gribov at samsung dot com
2013-10-14 6:49 ` kcc at gcc dot gnu.org
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: y.gribov at samsung dot com @ 2013-10-14 6:36 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58718
--- Comment #3 from Yury Gribov <y.gribov at samsung dot com> ---
Got it. I wonder whether we should keep the bug opened until we merge or close
it now.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug sanitizer/58718] Invalid check in libsanitizer
2013-10-14 6:02 [Bug sanitizer/58718] New: Invalid check in libsanitizer y.gribov at samsung dot com
2013-10-14 6:03 ` [Bug sanitizer/58718] " y.gribov at samsung dot com
2013-10-14 6:36 ` y.gribov at samsung dot com
@ 2013-10-14 6:49 ` kcc at gcc dot gnu.org
2013-11-05 8:21 ` y.gribov at samsung dot com
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: kcc at gcc dot gnu.org @ 2013-10-14 6:49 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58718
--- Comment #4 from Kostya Serebryany <kcc at gcc dot gnu.org> ---
I am currently testing a merge which is before Alexey's changes.
There is no harm in keeping this bug open.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug sanitizer/58718] Invalid check in libsanitizer
2013-10-14 6:02 [Bug sanitizer/58718] New: Invalid check in libsanitizer y.gribov at samsung dot com
` (2 preceding siblings ...)
2013-10-14 6:49 ` kcc at gcc dot gnu.org
@ 2013-11-05 8:21 ` y.gribov at samsung dot com
2013-11-05 18:58 ` tetra2005 at gmail dot com
2013-12-31 5:34 ` y.gribov at samsung dot com
5 siblings, 0 replies; 7+ messages in thread
From: y.gribov at samsung dot com @ 2013-11-05 8:21 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58718
--- Comment #5 from Yury Gribov <y.gribov at samsung dot com> ---
(In reply to Alexey Samsonov from comment #2)
> I've already fixed the problem with crashes caused by small
> "malloc_context_size" values. I think you should wait till the ASan runtime
> will be merged from LLVM into GCC.
I can reproduce this with current Clang/compiler-rt:
$ cat main.cpp
int main() {
delete new char[20];
return 0;
}
$ ~/install/bin/x86_64-unknown-linux-gnu-clang -g -O0 main.cpp
-fsanitize=address -o a.out
$ ASAN_OPTIONS=malloc_context_size=0:fast_unwind_on_malloc=0 ./a.out
...
==15804==AddressSanitizer CHECK failed:
/mnt/scratch/ygribov/llvm/projects/compiler-rt/lib/asan/asan_allocator2.cc:237
"((id)) != (0)" (0x0, 0x0)
-Y
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug sanitizer/58718] Invalid check in libsanitizer
2013-10-14 6:02 [Bug sanitizer/58718] New: Invalid check in libsanitizer y.gribov at samsung dot com
` (3 preceding siblings ...)
2013-11-05 8:21 ` y.gribov at samsung dot com
@ 2013-11-05 18:58 ` tetra2005 at gmail dot com
2013-12-31 5:34 ` y.gribov at samsung dot com
5 siblings, 0 replies; 7+ messages in thread
From: tetra2005 at gmail dot com @ 2013-11-05 18:58 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58718
--- Comment #7 from Yuri Gribov <tetra2005 at gmail dot com> ---
(In reply to Kostya Serebryany from comment #6)
> Can we keep this bug in one place, please?
> Let https://code.google.com/p/address-sanitizer/issues/detail?id=239 be the
> primary one
Ok, will do. I'm a little gcc-biased as you know.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug sanitizer/58718] Invalid check in libsanitizer
2013-10-14 6:02 [Bug sanitizer/58718] New: Invalid check in libsanitizer y.gribov at samsung dot com
` (4 preceding siblings ...)
2013-11-05 18:58 ` tetra2005 at gmail dot com
@ 2013-12-31 5:34 ` y.gribov at samsung dot com
5 siblings, 0 replies; 7+ messages in thread
From: y.gribov at samsung dot com @ 2013-12-31 5:34 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58718
Yury Gribov <y.gribov at samsung dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution|--- |FIXED
--- Comment #8 from Yury Gribov <y.gribov at samsung dot com> ---
Works for me in Clang and GCC trunks.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2013-12-31 5:34 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-10-14 6:02 [Bug sanitizer/58718] New: Invalid check in libsanitizer y.gribov at samsung dot com
2013-10-14 6:03 ` [Bug sanitizer/58718] " y.gribov at samsung dot com
2013-10-14 6:36 ` y.gribov at samsung dot com
2013-10-14 6:49 ` kcc at gcc dot gnu.org
2013-11-05 8:21 ` y.gribov at samsung dot com
2013-11-05 18:58 ` tetra2005 at gmail dot com
2013-12-31 5:34 ` y.gribov at samsung dot com
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).