Re: [Patch, libstdc++/63497] Avoid dereferencing invalid iterator in regex_executor

2014-11-25 Thread Jonathan Wakely
On 25/11/14 00:41 -0800, Tim Shen wrote: On Wed, Oct 22, 2014 at 8:19 PM, Tim Shen wrote: Committed. Thank you too! I'm backporting this patch to gcc-4_9-branch. Do we usually boot & test it and then commit directly, or it should be reviewed again? I approved it for the branch (in the bugzi

Re: [Patch, libstdc++/63497] Avoid dereferencing invalid iterator in regex_executor

2014-11-25 Thread Tim Shen
On Wed, Oct 22, 2014 at 8:19 PM, Tim Shen wrote: > Committed. Thank you too! I'm backporting this patch to gcc-4_9-branch. Do we usually boot & test it and then commit directly, or it should be reviewed again? -- Regards, Tim Shen commit 1e146769d08ff19cc01a08b91ca8fd3151f34faf Author: timshen

Re: [Patch, libstdc++/63497] Avoid dereferencing invalid iterator in regex_executor

2014-10-22 Thread Tim Shen
On Wed, Oct 22, 2014 at 4:04 PM, Jonathan Wakely wrote: > OK to commit, thanks! Committed. Thank you too! -- Regards, Tim Shen

Re: [Patch, libstdc++/63497] Avoid dereferencing invalid iterator in regex_executor

2014-10-22 Thread Jonathan Wakely
On 22/10/14 14:53 -0700, Tim Shen wrote: On Wed, Oct 22, 2014 at 7:34 AM, Jonathan Wakely wrote: Only if it's likely to catch problems in future. If you'd be putting it in only to make a testcase fail then it's not worth it. No, since I think with this patch _M_current is clearly valid when b

Re: [Patch, libstdc++/63497] Avoid dereferencing invalid iterator in regex_executor

2014-10-22 Thread Tim Shen
On Wed, Oct 22, 2014 at 7:34 AM, Jonathan Wakely wrote: > Only if it's likely to catch problems in future. If you'd be putting > it in only to make a testcase fail then it's not worth it. No, since I think with this patch _M_current is clearly valid when being dereferenced. > You could even simp

Re: [Patch, libstdc++/63497] Avoid dereferencing invalid iterator in regex_executor

2014-10-22 Thread Jonathan Wakely
On 21/10/14 09:45 -0700, Tim Shen wrote: On Tue, Oct 21, 2014 at 3:25 AM, Jonathan Wakely wrote: Did you manage to produce a testcase that crashed on trunk? Oh I forgot to mention that I've tried my best to make a testcase that crash the trunk, but failed :). I'm not sure if I should directl

Re: [Patch, libstdc++/63497] Avoid dereferencing invalid iterator in regex_executor

2014-10-21 Thread Tim Shen
On Tue, Oct 21, 2014 at 3:25 AM, Jonathan Wakely wrote: > Did you manage to produce a testcase that crashed on trunk? Oh I forgot to mention that I've tried my best to make a testcase that crash the trunk, but failed :). I'm not sure if I should directly put an assert in the code and make a test

Re: [Patch, libstdc++/63497] Avoid dereferencing invalid iterator in regex_executor

2014-10-21 Thread Jonathan Wakely
On 20/10/14 10:23 -0700, Tim Shen wrote: Bootstrapped and tested. Did you manage to produce a testcase that crashed on trunk? @@ -407,25 +409,28 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION template bool _Executor<_BiIter, _Alloc, _TraitsT, __dfs_mode>:: -_M_word_boundary(_State<_TraitsT>) c

[Patch, libstdc++/63497] Avoid dereferencing invalid iterator in regex_executor

2014-10-20 Thread Tim Shen
Bootstrapped and tested. Thanks! -- Regards, Tim Shen commit 95c73ab6280c1f8182d018ee29a44230965dd4ef Author: timshen Date: Sun Oct 19 15:14:55 2014 -0700 PR libstdc++/63497 include/bits/regex_executor.h (_Executor::_M_word_boundary): Remove const qualifier.