Re: [PATCH] PR c++/53609 - Wrong argument deduction for pack expansion in argument pack

2012-12-03 Thread Dodji Seketeli
Jason Merrill ja...@redhat.com writes: It seems like your new code is a generalization of the old code for handling substitution of a pack for itself (arg_from_parm_pack and such) and the code for handling other packs with a single pack expansion argument, and should replace those rather than

Re: [asan] Another ICE fix

2012-12-03 Thread Dodji Seketeli
Jakub Jelinek ja...@redhat.com writes: Fixed thusly, ok for trunk? 2012-11-27 Jakub Jelinek ja...@redhat.com * asan.c (instrument_assignment): Instrument lhs only for gimple_store_p and rhs1 only for gimple_assign_load_p. This is OK, thanks. And sorry for the delay. --

Re: [asan] Fix some asan ICEs

2012-12-03 Thread Dodji Seketeli
Ok for trunk? 2012-11-27 Jakub Jelinek ja...@redhat.com * asan.c (instrument_mem_region_access): Don't instrument if base doesn't have pointer type or len integral type. Add cast if len doesn't have size_t compatible type. (instrument_builtin_call): Don't

Re: [PING] [PATCH] PR c++/54401 - Confusing diagnostics about type-alias at class scope

2012-11-17 Thread Dodji Seketeli
Gabriel Dos Reis g...@integrable-solutions.net a écrit: On Fri, Nov 16, 2012 at 8:51 AM, Jason Merrill ja...@redhat.com wrote: Would it work to just do a cp_parser_commit_to_tentative_parse after we see the '='? I guess you mean in cp_parser_alias_declaration like in the updated patch below?

Re: [C++] Possible GCC bug

2012-11-16 Thread Dodji Seketeli
Jiri Palecek jpale...@web.de a écrit: Ulf Magnusson wrote: On Wed, Nov 14, 2012 at 6:10 PM, Piotr Wyderski piotr.wyder...@gmail.com wrote: The following snippet: class A {}; class B : public A { typedef A super; public: class X {}; }; class C : public B { typedef B

Re: [PATCH] Enable building of libsanitizer on sparc linux again.

2012-11-16 Thread Dodji Seketeli
David Miller da...@davemloft.net writes: From: Dodji Seketeli do...@redhat.com Date: Thu, 15 Nov 2012 11:56:40 +0100 David Miller da...@davemloft.net wrote From: Dodji Seketeli do...@redhat.com Date: Wed, 14 Nov 2012 14:26:40 +0100 I guess we could do that. That would build

Re: [PATCH 00/13] Request to merge Address Sanitizer in

2012-11-16 Thread Dodji Seketeli
Jack Howarth howa...@bromo.med.uc.edu writes: The Google branch is missing the required interception/mach_override/mach_override.h and interception/mach_override/mach_override.c files from compiler-rt svn for darwin. I have posted what I believe to be the final patch which eanbles

[PATCH] PR c++/54875 - Error when instantiating an alias template that resolves to an enum

2012-11-16 Thread Dodji Seketeli
Hello, Consider this short example: 1 templatetypename T 2 using AddConst = T const; 3 4 enum FwdEnum : int; 5 6 int main() { 7AddConstFwdEnum *ptr = nullptr; 8 } At line 7, when we build the type for AddConstFwdEnum in lookup_template_class_1,

[PING] [PATCH] PR c++/53609 - Wrong argument deduction for pack expansion in argument pack

2012-11-16 Thread Dodji Seketeli
I am friendly pinging the patch below ... Dodji Seketeli do...@redhat.com a écrit: Hello, Consider this example: 1templateclass...I struct List {}; 2templateint T struct Z {static const int value = T;}; 3templateint...T using LZ = ListZT...; 4

[PING] [PATCH] PR c++/54401 - Confusing diagnostics about type-alias at class scope

2012-11-16 Thread Dodji Seketeli
I am friendly pinging the patch below ... Dodji Seketeli do...@redhat.com a écrit: Hello, Consider this invalid example given in the PR, where T is not defined: 1templatetypename 2struct X { 3using type = T; 4}; g++ yields

Re: [PATCH] PR c++/54875 - Error when instantiating an alias template that resolves to an enum

2012-11-16 Thread Dodji Seketeli
Jason Merrill ja...@redhat.com writes: On 11/16/2012 07:43 AM, Dodji Seketeli wrote: So I guess that condition should be changed to TREE_CODE (template_type) == ENUMERAL_TYPE, to specifically detect the member enum of a class template case. Why does that help? What is template_type

Re: Patch: add AM_MAINTAINER_MODE in libsanitizer

2012-11-16 Thread Dodji Seketeli
Tom Tromey tro...@redhat.com a écrit: My build of gcc today tried to run autoconf in libsanitizer. However, I had the wrong version in my path, so the build died. In gcc it is normal to use AM_MAINTAINER_MODE to avoid this problem. I think this is missing from libsanitizer/configure.ac due

Re: [PATCH][Revised] Enable libsanitizer on darwin

2012-11-15 Thread Dodji Seketeli
Maybe Konstantin could Help with the review, as this touches libsanitizer? Cheers. Mike Stump mikest...@comcast.net writes: On Nov 14, 2012, at 6:43 AM, Jack Howarth howa...@bromo.med.uc.edu wrote: The attached patch assumes that mach_override/mach_override.h and

[PATCH] Enable building of libsanitizer on sparc linux again.

2012-11-15 Thread Dodji Seketeli
David Miller da...@davemloft.net wrote From: Dodji Seketeli do...@redhat.com Date: Wed, 14 Nov 2012 14:26:40 +0100 I guess we could do that. That would build libsanitizer, but asan will still not be available on sparc if the asan_shadow_offset() target hook is not provided. Is that OK

Re: [PATCH] Copy libsanitizer from llvm at revision 167890

2012-11-15 Thread Dodji Seketeli
a/ChangeLog b/ChangeLog index 8cd3b23..f035803 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2012-11-15 Dodji Seketeli do...@redhat.com + + * MAINTAINERS: (asan.c, related): Add myself. + 2012-11-14 Roland McGrath mcgra...@google.com * configure.ac (ENABLE_GOLD

Re: [asan] Patch - fix an ICE in asan.c

2012-11-15 Thread Dodji Seketeli
Jakub Jelinek ja...@redhat.com writes: 2012-11-12 Jakub Jelinek ja...@redhat.com * asan.c (report_error_func): Set DECL_IGNORED_P, don't touch DECL_ASSEMBLER_NAME. (asan_init_func): Likewise. (asan_finish_file): Use void * instead of __asan_global * as type

Re: ASAN merge...

2012-11-14 Thread Dodji Seketeli
Diego Novillo dnovi...@google.com writes: On Tue, Nov 13, 2012 at 12:07 AM, David Miller da...@davemloft.net wrote: This has broken the build on every Linux target that hasn't added the necessary cpu specific code to asan_linux.cc This should be fixed by Dodji's recent patch. ASAN is not

Re: ASAN merge...

2012-11-14 Thread Dodji Seketeli
David Miller da...@davemloft.net writes: From: Diego Novillo dnovi...@google.com Date: Tue, 13 Nov 2012 11:21:59 -0500 On Tue, Nov 13, 2012 at 12:07 AM, David Miller da...@davemloft.net wrote: This has broken the build on every Linux target that hasn't added the necessary cpu specific code

Re: PATCH: PR other/55292: libsanitizer doesn't support x32

2012-11-13 Thread Dodji Seketeli
Diego Novillo dnovi...@google.com a écrit: Patches to libsanitizer should be sent upstream. We should only contain a copy of the master in the LLVM repository. There should be instructions in libsanitizer/README.gcc (Jakub, Dodji, are they there? I can't check ATM). No there are not, for

Re: Committed: framework bits for disabling libsanitizer. RFC on which targets for which to disable it.

2012-11-13 Thread Dodji Seketeli
Jakub Jelinek ja...@redhat.com writes: On Tue, Nov 13, 2012 at 02:17:55PM +0100, Dodji Seketeli wrote: What do the maintainers think? Yes. And it shouldn't be just based on target CPU, but also based on target OS, I don't think libsanitizer supports anything but linux (glibc + maybe

[PATCH] Enable libsanitizer just on x86 linux for now

2012-11-13 Thread Dodji Seketeli
Hello, This patch builds libsanitizer only on x86_64 and i?86 linux targets for now. I guess The build can be enabled on other targets when they are ready. OK for trunk? ChangeLog: * configure.ac: Enable libsanitizer just on x86 linux for now. * configure: Re-generate. ---

Re: Committed: framework bits for disabling libsanitizer. RFC on which targets for which to disable it.

2012-11-13 Thread Dodji Seketeli
domi...@lps.ens.fr (Dominique Dhumieres) writes: Yes. And it shouldn't be just based on target CPU, but also based on target OS, I don't think libsanitizer supports anything but linux (glibc + maybe android) right now, with some smaller or bigger tweaks it could support darwin (but see the

Re: [PATCH 03/11] Emit GIMPLE directly instead of gimplifying GENERIC.

2012-11-12 Thread Dodji Seketeli
deletions(-) diff --git a/gcc/ChangeLog.asan b/gcc/ChangeLog.asan index d13a584..0345ac7 100644 --- a/gcc/ChangeLog.asan +++ b/gcc/ChangeLog.asan @@ -1,4 +1,32 @@ 2012-10-11 Jakub Jelinek ja...@redhat.com + Xinliang David Li davi...@google.com + Dodji Seketeli do...@redhat.com

Re: [PATCH 02/10] Initial asan cleanups

2012-11-12 Thread Dodji Seketeli
On 2012-11-02 15:57 , Dodji Seketeli wrote: /* AddressSanitizer, a fast memory error detector. - Copyright (C) 2011 Free Software Foundation, Inc. + Copyright (C) 2011, 2012 Free Software Foundation, Inc. I *think* we should only mention 2012, but I don't know if code

Re: [PATCH 01/10] Initial import of asan from the Google branch into trunk

2012-11-12 Thread Dodji Seketeli
100644 index 000..704aa61 --- /dev/null +++ b/gcc/ChangeLog.asan @@ -0,0 +1,12 @@ +2012-10-10 Wei Mi w...@google.com + Diego Novillo dnovi...@google.com + Dodji Seketeli do...@redhat.com + + * Makefile.in: Add asan.c and its dependencies. + * common.opt: Add

Re: [PATCH 05/10] Implement protection of stack variables

2012-11-12 Thread Dodji Seketeli
Diego Novillo dnovi...@google.com writes: I believe they layout the stack from right to left (top is to the right). Feels like reading a middle earth map. Kostya, is my recollection correct? Yes, Konstantin replied to this already but I forgot to update the patch cover letter (that I keep

Re: [PATCH 06/10] Implement protection of global variables

2012-11-12 Thread Dodji Seketeli
Diego Novillo dnovi...@google.com writes: On 2012-11-02 16:01 , Dodji Seketeli wrote: * varasm.c: Include asan.h. (assemble_noswitch_variable): Grow size by asan_red_zone_size if decl is asan protected. (place_block_symbol): Likewise. (assemble_variable): If decl

Re: [PATCH 09/10] Instrument built-in memory access function calls

2012-11-12 Thread Dodji Seketeli
Diego Novillo dnovi...@google.com writes: On 2012-11-02 16:05 , Dodji Seketeli wrote: +static bool +maybe_instrument_builtin_call (gimple_stmt_iterator *iter) +{ + gimple call = gsi_stmt (*iter); + location_t loc = gimple_location (call); + + if (!is_gimple_call (call)) +return

Re: [PATCH 10/10] Import the asan runtime library into GCC tree

2012-11-12 Thread Dodji Seketeli
Diego Novillo dnovi...@google.com writes: On 2012-11-02 16:10 , Dodji Seketeli wrote: * configure.ac: Add libsanitizer to target_libraries. * Makefile.def: Ditto. * configure: Regenerate. * Makefile.in: Regenerate. * libsanitizer: New directory for asan runtime

Re: [asan] Patch - fix an ICE in asan.c

2012-11-12 Thread Dodji Seketeli
Tobias Burnus bur...@net-b.de writes: The attached test case ICEs (segfault) both on the asan branch and on the trunk with Dodji's patches: Thank you for reporting this. I believe the neqw series of patches I have juste posted address this issue. To ease the testing, you can check out an

Re: [PATCH 00/13] Request to merge Address Sanitizer in

2012-11-12 Thread Dodji Seketeli
Following a request from Jakub, and given the fact that the patch set have been reviewed by Diego, I have committed the last set of patches I have posted to trunk. This will hopefully ease the polishing work that has started already. I am of course watching for the fall-outs. --

Re: [PATCH 05/10] Implement protection of stack variables

2012-11-12 Thread Dodji Seketeli
Jakub Jelinek ja...@redhat.com writes: On Mon, Nov 12, 2012 at 12:30:37PM +0100, Dodji Seketeli wrote: + For this function, the stack protected by asan will be organized as + follows, from the top of the stack to the bottom: + + Slot 1/ [red zone of 32 bytes called 'RIGHT RedZone

Re: [asan] Patch - fix an ICE in asan.c

2012-11-12 Thread Dodji Seketeli
Jakub Jelinek ja...@redhat.com writes: The bug is elsewhere, the following patch should fix this (and I've reordered the assignments according to the call arg number, so that it is more readable at the same time). Ok for trunk? 2012-11-12 Jakub Jelinek ja...@redhat.com * asan.c

Re: [PATCH 00/13] Request to merge Address Sanitizer in

2012-11-12 Thread Dodji Seketeli
Hello Jack, Jack Howarth howa...@bromo.med.uc.edu writes: Dodji, I am finding that at r193442 bootstrapping on x86_64-apple-darwin12 fails with... ../../../../gcc-4.8-20121112/libsanitizer/interception/interception_mac.cc:16:41: fatal error: mach_override/mach_override.h: No such

Re: [PATCH 08/10] Factorize condition insertion code out of build_check_stmt

2012-11-05 Thread Dodji Seketeli
Jakub Jelinek ja...@redhat.com writes: On Sat, Nov 03, 2012 at 12:03:45AM +0100, Dodji Seketeli wrote: + int fallthrough_probability = +then_more_likely_p +? PROB_VERY_UNLIKELY +: PROB_ALWAYS - PROB_VERY_UNLIKELY; Just a formatting nit, I think = needs to go on the next line

Re: [asan] change libasan to libsanitizer

2012-11-04 Thread Dodji Seketeli
Jakub Jelinek ja...@redhat.com writes: On Thu, Nov 01, 2012 at 02:52:52PM -0700, Xinliang David Li wrote: I think it is better to apply this patch to asan first to avoid extra thread. You probably just need to retrieve your runtime part of the trunk patch and resend it. Make sense? Yeah,

[PATCH 10/10] Import the asan runtime library into GCC tree

2012-11-03 Thread Dodji Seketeli
[After multiple failed attempts at compressing this huge patch enough to let it pass through the drastic mailing engine's 400KB size limit, I am sending a link to the patch (at the end of this message) to let people download it instead. Sorry for spamming the people in the CC list.] This

Re: [PATCH 06/13] Implement protection of stack variables

2012-11-02 Thread Dodji Seketeli
Konstantin Serebryany konstantin.s.serebry...@gmail.com writes: [A cultural question I've kept asking myself is Why has address sanitizer authors called these red zones (LEFT, MIDDLE, RIGHT) instead of e.g, (BOTTOM, MIDDLE, TOP). Maybe they can step up and educate me so that I get less

Re: [PATCH 06/13] Implement protection of stack variables

2012-11-02 Thread Dodji Seketeli
Xinliang David Li davi...@google.com writes: Changing the option is part of the plan. Indeed. Dodji, can you make the option change part of one the patches (e.g, the first one that introduces it) -- there seems no need for a separate patch for it. Sure thing. I have done the change on my

Re: [PATCH 06/13] Implement protection of stack variables

2012-11-02 Thread Dodji Seketeli
Konstantin Serebryany konstantin.s.serebry...@gmail.com writes: http://research.google.com/pubs/archive/37752.pdf The horizontal drawing is given in section 3.3 and hence the redzones there are called left/right. The stack poisoning is only explained using an example in C. Great, thanks.

Re: [PATCH 02/13] Rename tree-asan.[ch] to asan.[ch]

2012-11-02 Thread Dodji Seketeli
Joseph S. Myers jos...@codesourcery.com writes: On Thu, 1 Nov 2012, do...@redhat.com wrote: From: dnovillo dnovillo@138bc75d-0d04-0410-961f-82ee72b054a4 Following a discussion we had on this list, this patch renames the file tree-asan.* into asan.*. * asan.c: Rename from

[PATCH 04/10] Allow asan at -O0

2012-11-02 Thread Dodji Seketeli
. + * tree-pass.h (pass_asan_O0): New declaration. + 2012-10-11 Jakub Jelinek ja...@redhat.com Dodji Seketeli do...@redhat.com diff --git a/gcc/asan.c b/gcc/asan.c index baaec0f..e7f4943 100644 --- a/gcc/asan.c +++ b/gcc/asan.c @@ -123,7 +123,7 @@ build_check_stmt (tree base

[PATCH 05/10] Implement protection of stack variables

2012-11-02 Thread Dodji Seketeli
This patch implements the protection of stack variables. To understand how this works, lets look at this example on x86_64 where the stack grows downward: int foo () { char a[23] = {0}; int b[2] = {0}; a[5] = 1; b[1] = 2; return a[5] + b[1]; } For this function, the stack

[PATCH 06/10] Implement protection of global variables

2012-11-02 Thread Dodji Seketeli
This patch implements the protection of global variables. The basic idea is to insert a red zone between two global variables and install a constructor function that calls the asan runtime to do the populating of the relevant shadow memory regions at load time. So the patch lays out the global

[PATCH 07/10] Make build_check_stmt accept an SSA_NAME for its base

2012-11-02 Thread Dodji Seketeli
/asan.c | 36 +++- 2 files changed, 28 insertions(+), 13 deletions(-) diff --git a/gcc/ChangeLog.asan b/gcc/ChangeLog.asan index a2e18ce..395ba4f 100644 --- a/gcc/ChangeLog.asan +++ b/gcc/ChangeLog.asan @@ -1,3 +1,8 @@ +2012-10-26 Dodji Seketeli do...@redhat.com

[PATCH 08/10] Factorize condition insertion code out of build_check_stmt

2012-11-02 Thread Dodji Seketeli
| 120 + 2 files changed, 81 insertions(+), 44 deletions(-) diff --git a/gcc/ChangeLog.asan b/gcc/ChangeLog.asan index 395ba4f..903dc52 100644 --- a/gcc/ChangeLog.asan +++ b/gcc/ChangeLog.asan @@ -1,5 +1,10 @@ 2012-10-26 Dodji Seketeli

[PATCH 09/10] Instrument built-in memory access function calls

2012-11-02 Thread Dodji Seketeli
100644 --- a/gcc/ChangeLog.asan +++ b/gcc/ChangeLog.asan @@ -1,5 +1,23 @@ 2012-10-26 Dodji Seketeli do...@redhat.com + * asan.c (insert_if_then_before_iter, instrument_mem_region_access, + (instrument_strlen_call, maybe_instrument_builtin_call, + (maybe_instrument_call): New

Re: [asan] change libasan to libsanitizer

2012-11-01 Thread Dodji Seketeli
Instead of planning this change for the branch, would it be possible to plan it for trunk directly, on top of the patches that I posted for review there? The patch could go in on top of the patches I posted. Wei Mi w...@google.com writes: This is the part2. On Thu, Nov 1, 2012 at 1:02 PM,

Getting ready to merge AddressSanitizer into trunk

2012-10-29 Thread Dodji Seketeli
Hello, This message is just an excuse to kick off a discussion about how we should proceed to prepare the merge of the AddressSanitizer branch into trunk, as the not-yet known date of the stage1 closing seems to be approaching fast now. Here are some topics that I think would be interesting to

Re: [PATCH] PR c++/54955 - Fail to parse alignas expr at the beginning of a declaration

2012-10-27 Thread Dodji Seketeli
Jason Merrill ja...@redhat.com writes: On 10/26/2012 01:37 PM, Dodji Seketeli wrote: cp_next_tokens_can_be_std_attribute_p (cp_parser *parser) { - return cp_nth_tokens_can_be_std_attribute_p (parser, 1); + cp_token *token = cp_lexer_peek_token (parser-lexer); + + return (cxx_dialect

[PATCH] PR c++/54466 - ICE with alias template which type-id is const qualified

2012-10-27 Thread Dodji Seketeli
Hello, Consider this short example: templatetypename T struct X { }; templatetypename T using Y = const XT; using Z = Yint; G++ crashes in lookup_class_template_1 while trying to build the alias template instantiation Yint. I think this is indirectly due to the fact

Re: [PATCH 3/3] [asan] Instrument built-in memory access function calls

2012-10-26 Thread Dodji Seketeli
Jakub Jelinek ja...@redhat.com writes: + location_t location = gimple_location (call); I'd call the var just loc, that is far more commonly used and shorter. Done. + /* If we initially had an instruction like: + + int n = strlen (str) + + we now want to instrument the access

[PATCH] PR c++/54955 - Fail to parse alignas expr at the beginning of a declaration

2012-10-26 Thread Dodji Seketeli
Hello, In this PR, G++ embarrassingly fails to parse the simple alignas expression below: alignas(double) int f; even though the simple-declaration production in Clause 7 suggests otherwise. Fixed thus and tested on x86_64-unknown-linux-gnu against trunk. gcc/cp PR c++/54955

Re: [PATCH 3/3] [asan] Instrument built-in memory access function calls

2012-10-25 Thread Dodji Seketeli
it should be that. I have updated the patch. Jakub Jelinek ja...@redhat.com writes: On Wed, Oct 24, 2012 at 05:16:26PM +0200, Dodji Seketeli wrote: Jakub Jelinek ja...@redhat.com writes: For 'strlen', can the memory check be done at the end of the string using the returned length? Guess

Re: [PATCH 3/3] [asan] Instrument built-in memory access function calls

2012-10-25 Thread Dodji Seketeli
Jakub Jelinek ja...@redhat.com writes: +instrument_derefs (iter, dest, location, is_store); BUILTIN_ATOMIC_LOAD* are just loads and so should clear is_store. Done. + if (len != NULL_TREE) +{ + is_store = (dest != NULL_TREE); + + if (source0 != NULL_TREE) +

Re: [PATCH 2/3] [asan] Factorize condition insertion code out of build_check_stmt

2012-10-24 Thread Dodji Seketeli
Jakub Jelinek ja...@redhat.com writes: On Tue, Oct 23, 2012 at 03:08:07PM +0200, Dodji Seketeli wrote: +static gimple_stmt_iterator +create_cond_insert_point_before_iter (gimple_stmt_iterator *iter, + bool then_more_likely_p

Re: [PATCH 3/3] [asan] Instrument built-in memory access function calls

2012-10-24 Thread Dodji Seketeli
Jakub Jelinek ja...@redhat.com writes: On Tue, Oct 23, 2012 at 03:11:29PM +0200, Dodji Seketeli wrote: + /* (src, n) style memops. */ +case BUILT_IN_STRNDUP: + source0 = gimple_call_arg (call, 0); + len = gimple_call_arg (call, 1); + break; I think you can't

Re: [PATCH 3/3] [asan] Instrument built-in memory access function calls

2012-10-24 Thread Dodji Seketeli
Jakub Jelinek ja...@redhat.com writes: For 'strlen', can the memory check be done at the end of the string using the returned length? Guess strlen is commonly expanded inline, so it would be worthwhile to check the shadow memory after the call (well, we could check the first byte before the

Re: [PATCH 3/3] [asan] Instrument built-in memory access function calls

2012-10-24 Thread Dodji Seketeli
Jakub Jelinek ja...@redhat.com writes: On Wed, Oct 24, 2012 at 05:16:26PM +0200, Dodji Seketeli wrote: Jakub Jelinek ja...@redhat.com writes: For 'strlen', can the memory check be done at the end of the string using the returned length? Guess strlen is commonly expanded inline, so

Re: PR c++/54928 infinite ICE when reporting ICE on macro expansion

2012-10-24 Thread Dodji Seketeli
I am not a maintainer so the below are just some casual comments of mine. I am deferring to the maintainers for a real review. Manuel López-Ibáñez lopeziba...@gmail.com writes: gcc/ * tree-diagnostic.c (maybe_unwind_expanded_macro_loc): Use diagnostic_attach_note. *

[PATCH 0/3][asan] Instrument memory access builtins calls

2012-10-23 Thread Dodji Seketeli
Hello, The three patches following up this message implement instrumenting memory access builtins calls in AddressSanitizer, like what the llvm implementation does. The first two patches do some factorizing that is used by the third one. I have split them up like this to ease the review and to

[PATCH 1/3] [asan] Make build_check_stmt accept an SSA_NAME for its base

2012-10-23 Thread Dodji Seketeli
This patch makes build_check_stmt accept its memory access parameter to be an SSA name. This is useful for a subsequent patch that will re-use. Tested by running cc1 -fasan on the program below with and without the patch and inspecting the gimple output to see that there is no change. void foo

[PATCH 2/3] [asan] Factorize condition insertion code out of build_check_stmt

2012-10-23 Thread Dodji Seketeli
This patch splits a new create_cond_insert_point_before_iter function out of build_check_stmt, to be used by a later patch. Tested by running cc1 -fasan on the test program below with and without the patch and by inspecting the gimple output to see that there is no change. void foo () { char

[PATCH 3/3] [asan] Instrument built-in memory access function calls

2012-10-23 Thread Dodji Seketeli
This patch instruments many memory access patterns through builtins. Basically, for a call like: __builtin_memset (from, 0, n_bytes); the patch would only instrument the accesses at the beginning and at the end of the memory region [from, from + n_bytes]. This is the strategy used by the

Re: [patch] PR 54930: add -Wreturn-local-addr

2012-10-21 Thread Dodji Seketeli
The C++ bits look good to my casual non-maintainer eyes. Let's CC Jason. Thanks. Jonathan Wakely jwakely@gmail.com a écrit: This adds a warning switch for the existing returning address of local variable warnings in the C and C++ FEs which are enabled by default but have no switch

Re: PR c++/54928 infinite ICE when reporting ICE on macro expansion

2012-10-17 Thread Dodji Seketeli
Hello Manuel, Let's CC Gaby on this one as well. Manuel López-Ibáñez lopeziba...@gmail.com writes: The problem is that the macro unwinder code is changing the original diagnostic type and not restoring it, so the code detecting that we ICE fails to abort, which triggers another ICE, and so

[PATCH] Cleanup comments in alias.c

2012-10-15 Thread Dodji Seketeli
Hello, While reading alias.c, it seemed to me that some comments could use some cleanups. OK for trunk? Thanks. gcc/ * alias.c: Cleanup comments. --- gcc/alias.c | 27 +-- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/gcc/alias.c

Re: [C++] Omit overflow check for new char[n]

2012-10-11 Thread Dodji Seketeli
Florian Weimer fwei...@redhat.com a écrit: On 10/10/2012 06:02 PM, Dodji Seketeli wrote: I just have one question for own education. Regarding: @@ -2450,7 +2450,13 @@ if (array_p TYPE_VEC_NEW_USES_COOKIE (elt_type)) size = size_binop (PLUS_EXPR, size, cookie_size

Re: [PATCH] PR 53528 c++/ C++11 Generalized Attribute support

2012-10-10 Thread Dodji Seketeli
domi...@lps.ens.fr (Dominique Dhumieres) a écrit: The following tests are failing (with -m32): FAIL: g++.dg/cpp0x/gen-attrs-36.C (test for warnings, line 9) FAIL: g++.dg/cpp0x/gen-attrs-36.C (test for excess errors) FAIL: g++.dg/cpp0x/gen-attrs-37.C (test for excess errors) FAIL:

Re: [C++] Omit overflow check for new char[n]

2012-10-10 Thread Dodji Seketeli
Hello Florian, Let's CC Jason for this optimization patch. Florian Weimer fwei...@redhat.com a écrit: If the size of the inner array elements is 1 and we do not need a cookie, we do not need to insert an overflow check. This applies to the relatively frequent new char[n] case. I just have

Re: [PATCH] PR 53528 c++/ C++11 Generalized Attribute support

2012-10-09 Thread Dodji Seketeli
Hello Dominique, domi...@lps.ens.fr (Dominique Dhumieres) writes: The following tests are failing (with -m32): FAIL: g++.dg/cpp0x/gen-attrs-36.C (test for warnings, line 9) FAIL: g++.dg/cpp0x/gen-attrs-36.C (test for excess errors) FAIL: g++.dg/cpp0x/gen-attrs-37.C (test for excess errors)

Re: [PATCH] PR c++/53540 - using fails to be equivalent to typedef

2012-10-09 Thread Dodji Seketeli
Jason Merrill ja...@redhat.com writes: Let's move the alias template case from primary_template_instantiation_p into alias_template_specialization_p and call the latter from the former. And also call it from tsubst. Like the below? Note that I have changed the type of the argument of

[PATCH 1/3] Disambiguate nested objc-message-expressions and c++11 attributes

2012-10-09 Thread Dodji Seketeli
Hello, A couple of obj-c++ tests were failing[1] because the tokens '[[' can either be the beginning of a c++11 attribute (that is itself at the beginning of a statement), or the beginning of a nested objc-message-expression. This patch resolves the ambiguity by tentatively parsing the c++11

[PATCH 2/3] Update g++.dg/cpp0x/gen-attrs-{8,36,37}.C as c++11 attributes to types are ignored

2012-10-09 Thread Dodji Seketeli
Hello, The current implementation of C++11 attributes forbids them from being applied to a type unless the type is being declared. I forgot to adjust g++.dg/cpp0x/gen-attrs-{8,36,37}.C that was being run only on ia32. Fixed thus, tested on i386-unknown-linux-gnu and x86_64-unknown-linux-gnu

Re: [PATCH] PR 53528 c++/ C++11 Generalized Attribute support

2012-10-08 Thread Dodji Seketeli
Jason Merrill ja...@redhat.com writes: OK. Thanks. Committed to trunk at revision r192199. -- Dodji

Experimental Address Sanitizer for 4.8 (was Re: How much time left till phase 3?)

2012-10-05 Thread Dodji Seketeli
Diego Novillo dnovi...@google.com writes: On 2012-10-02 05:45 , Richard Guenther wrote: Anybody else with things they want to merge during stage1? Finally, I've been thinking of porting asan/tsan to replace mudflap. Dodji, you expressed interest in it recently. Yes I did. A bit too

Re: [C++ PATCH] -Wsizeof-pointer-memaccess warning (take 2)

2012-10-03 Thread Dodji Seketeli
Jakub Jelinek ja...@redhat.com a écrit: --- gcc/cp/call.c.jj 2012-09-27 12:45:49.0 +0200 +++ gcc/cp/call.c 2012-10-01 17:53:17.594609236 +0200 @@ -557,7 +557,10 @@ null_ptr_cst_p (tree t) { /* Core issue 903 says only literal 0 is a null pointer constant. */

[PATCH] PR c++/54401 - Confusing diagnostics about type-alias at class scope

2012-09-28 Thread Dodji Seketeli
Hello, Consider this invalid example given in the PR, where T is not defined: 1 templatetypename 2 struct X { 3 using type = T; 4 }; g++ yields the confusing diagnostics: test.cc:3:10: error: expected nested-name-specifier before 'type' using type = T;

Re: [PATCH] PR c++/54372 - unused attribute inactive on dependant entities

2012-09-25 Thread Dodji Seketeli
Jason Merrill ja...@redhat.com writes: On 09/20/2012 10:01 AM, Dodji Seketeli wrote: This is because in cplus_decl_attributes, save_template_attributes makes so that the 'unused' attribute is applied to its appertaining entity only at instantiation time. But then at parsing time

[PATCH] PR c++/29028 - Missed unused warning on using declaration

2012-09-21 Thread Dodji Seketeli
Hello, In the example of the patch, g++ fails to warn that the variable N::i (introduced via a using declaration) is unused. This is because as we want to emit the warning in poplevel, when we walk the local bindings returned by getdecls, we forget that a VAR_DECL introduced by a using

[PATCH] PR c++/53609 - Wrong argument deduction for pack expansion in argument pack

2012-09-20 Thread Dodji Seketeli
Hello, Consider this example: 1 templateclass...I struct List {}; 2 templateint T struct Z {static const int value = T;}; 3 templateint...T using LZ = ListZT...; 4 5 templateclass...U 6 struct F 7 { 8using N = LZU::value...; //#1 This should

[PATCH] PR c++/53551 - -Wunused-local-typedefs misses uses

2012-09-20 Thread Dodji Seketeli
Hello, We don't record the use of a typedef when it's used through a typename. So on the example of the patch, g++ complains that the 'type' typedef is not used. Fixed thus. Tested on x86_64-unknown-linux-gnu against trunk. gcc/cp/ * decl.c (make_typename_type): Record the use of

[Jiří Paleček] [PATCH][C++] Fix constant reference in a lambda (PR c++/53488)

2012-08-27 Thread Dodji Seketeli
Let's CC Jason. ---BeginMessage--- Hello, I've been investigating a bug in gcc I came across recently and after some difficulties, I have produced a patch that actually fixes that behavior. However, I don't think the patch is very good and I would really appreciate your help in making it

PING^2: [PATCH] PR preprocessor/53469 - argument tokens of _Pragma miss virtual location

2012-08-27 Thread Dodji Seketeli
PING^2. Dodji Seketeli do...@redhat.com writes: Hello, Consider this short test snippet: -8--- #define STRINGIFY(x) #x #define TEST(x) \ _Pragma(STRINGIFY(GCC diagnostic ignored -Wunused-local-typedefs)) \ typedef int myint

Re: Patches to enable -ftrack-macro-expansion by default

2012-08-26 Thread Dodji Seketeli
Gabriel Dos Reis g...@integrable-solutions.net writes: I think we show the stack not just for errors, but for any diagnostics. I agree, FWIW. -- Dodji

[PATCH] Make TREE_NOTHROW use the base.nothrow_flag again

2012-08-22 Thread Dodji Seketeli
Hello, While working on something else, I noticed that debug_tree (vec), when vec is a TREE_VEC, was crashing because TREE_NOTHROW was asserting that its argument is not a TREE_VEC, so print_node would crash. It turned out that TREE_NOTHROW was accidentally modified by this change set: commit

Re: Problem running the libgomp testsuite

2012-08-20 Thread Dodji Seketeli
Hello Jiří, I think this question should be directed at gcc-h...@gcc.gnu.org. Please send any response to this email there. Jiří Paleček jpale...@web.de a écrit: I tried to run make check-c++ from the top directory of the source code. Quoted from http://gcc.gnu.org/install/configure.html:

Re: Speedups/Cleanups: End of GSOC patch collection

2012-08-20 Thread Dodji Seketeli
Dimitrios Apostolou ji...@gmx.net a écrit: [...] * include/libiberty.h (XOBDELETE, XOBGROW, XOBGROWVEC, XOBSHRINK) (XOBSHRINKVEC, XOBFINISH): New type-safe macros for obstack operations. (XOBFINISH): Changed to return (T *) instead of T. All callers updated.

[PATCH] PR c++/53540 - using fails to be equivalent to typedef

2012-08-16 Thread Dodji Seketeli
Hello, In the example of this problem report, during the substituting of int into 'function', tsubst_aggr_type fails for the alias ctxt1. This is because TYPE_TEMPLATE_INFO looks for the TEMPLATE_INFO of the ctxt1 alias at the wrong place and was wrongly finding it to be NULL. Namely, it was

Re: [PATCH] Combine location with block using block_locations

2012-08-14 Thread Dodji Seketeli
Dehao Chen de...@google.com writes: Index: libcpp/line-map.c [...] + /* Data structure to associate an arbitrary data to a source location. */ + struct location_adhoc_data { + source_location locus; + void *data; + }; + + /* The following data structure encodes a location with some

Re: Merge C++ conversion into trunk (3/6 - gengtype C++ support)

2012-08-14 Thread Dodji Seketeli
Hello Diego, Just some minor comments. Diego Novillo dnovi...@google.com a écrit: [...] +@section User-provided marking routines for template types +When a template type @code{TP} is marked with @code{GTY}, all +instances of that type are considered user-provided types. This means +that

Re: [PATCH 1/2] gcc symbol database

2012-08-13 Thread Dodji Seketeli
Hello Yunfeng, Thank you for following up, and sorry for me reviewing your patches so lately. The libcpp changes are coming along nicely, IMHO. I like the fact that they are getting pretty minimal. I just have a few mostly cosmetic comments at this point. [...] diff -cpr

Re: [PATCH] Combine location with block using block_locations

2012-08-13 Thread Dodji Seketeli
Hello Dehao, I have mostly cosmetic comments to make about the libcpp parts. Dehao Chen de...@google.com writes: Index: libcpp/include/line-map.h === *** libcpp/include/line-map.h (revision 189835) --- libcpp/include/line-map.h

Re: [PATCH, libjava] Use accessor functions to manipulate xmlOutputBuffer

2012-08-09 Thread Dodji Seketeli
Andrew Hughes ahug...@redhat.com writes: OK. As this is a GNU Classpath change, it should go in there first to avoid creating a divergence which will cause later problems in merging. Classpath is regularly merged into gcj as a whole. I found several patches during the last merge

Re: [PATCH, libjava] Use accessor functions to manipulate xmlOutputBuffer

2012-08-09 Thread Dodji Seketeli
Andrew Hughes ahug...@redhat.com writes: Don't worry about reverting it. I'll add it to Classpath now, then they'll be in sync when we do the next merge. Thank you. In future, please post changes to files under the libjava/classpath directory to classp...@gnu.org and feel free to ping me

[PATCH, libjava] Use accessor functions to manipulate xmlOutputBuffer

2012-08-08 Thread Dodji Seketeli
Hello, This is a fix to prepare the xmlj_io.c file of gnu classpath to a coming API change in libxml2. Basically, we were previously accessing fields inside the xmlOutputBuffer struct of libxml2. In a coming version of libxml2, that won't be possible anymore. Client code will have to use

[PATCH - C++] Avoid crashing on erroneous static_assert usage

2012-08-06 Thread Dodji Seketeli
When working on something else, I noticed that failing to provide the second argument to the static_assert operator would lead to an ICE. Fixed thus, and tested against trunk on x86_64-unknown-linux-gnu. gcc/cp/ * semantics.c (finish_static_assert): Don't crash on erroneous

Re: [gimplefe] Patch for recognizing function declarations

2012-08-01 Thread Dodji Seketeli
Hello, Sandeep Soni soni.sande...@gmail.com a écrit: Hi Diego, The following patch recognizes function declarations. I am now trying to create a gimple sequence of all the statements within the function body. The chagelog is as follows: 2012-07-31 Sandeep Soni soni.sande...@gmail.com

Re: Diagnostics from GCC_DRIVER_HOST_INITIALIZATION

2012-07-27 Thread Dodji Seketeli
Hello, Ryan Mansfield rmansfi...@qnx.com a écrit: On 12-07-19 06:06 PM, Gabriel Dos Reis wrote: [...] Would moving the GCC_DRIVER_HOST_INITIALIZATION after diagnostic_initialize be OK? yes, I think so. OK, then here's a changelog entry for the diff. 2012-07-20 Ryan Mansfield

Re: Diagnostics from GCC_DRIVER_HOST_INITIALIZATION

2012-07-27 Thread Dodji Seketeli
Gabriel Dos Reis g...@integrable-solutions.net a écrit: 2012-07-20 Ryan Mansfield rmansfi...@qnx.com javascript:; * gcc.c (main): Move GCC_DRIVER_HOST_INITIALIZATION after diagnostic_initialize. Could someone please apply the change? The change seems small and

<    1   2   3   4   5   6   >