Re: [PATCH] D15450: Avoid double deletion in Clang driver.

2016-02-18 Thread Serge Pavlov via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL261222: Avoid double deletion in Clang driver. (authored by sepavloff). Changed prior to commit: http://reviews.llvm.org/D15450?vs=46575&id=48332#toc Repository: rL LLVM http://reviews.llvm.org/D154

Re: [PATCH] D15450: Avoid double deletion in Clang driver.

2016-02-17 Thread Yaron Keren via cfe-commits
yaron.keren accepted this revision. yaron.keren added a reviewer: yaron.keren. yaron.keren added a comment. This revision is now accepted and ready to land. Would be nice to have CodeGenAction::TheModule redirect to CodeGeneratorImpl::M if possible, but that's for another patch. LGTM. http://re

Re: [PATCH] D15450: Avoid double deletion in Clang driver.

2016-02-17 Thread Serge Pavlov via cfe-commits
sepavloff added a comment. In http://reviews.llvm.org/D15450#354606, @yaron.keren wrote: > It certainly makes sense to redirect the module request to its owner instead > of duplicating it in a local copy. It is not even a duplication, it is simultaneous sharing by two unique_ptr's. > There ma

Re: [PATCH] D15450: Avoid double deletion in Clang driver.

2016-02-17 Thread Yaron Keren via cfe-commits
yaron.keren added a comment. It certainly makes sense to redirect the module request to its owner instead of duplicating it in a local copy. There may be a change in behaviour here, pre-patch CodeGenAction::EndSourceFileAction() would take the BackendConsumer Module, keeping CodeGen Module int

Re: [PATCH] D15450: Avoid double deletion in Clang driver.

2016-02-09 Thread Serge Pavlov via cfe-commits
CodeGen action defined in the unit test does not call HandleTranslationUnit, so the hack implemented in `BackendConsumer::HandleTranslationUnit` does not run and clang crashes. With the fix no crash occurs. Thanks, --Serge 2016-02-05 1:17 GMT+06:00 Serge Pavlov : > sepavloff added a comment. > >

Re: [PATCH] D15450: Avoid double deletion in Clang driver.

2016-02-04 Thread Serge Pavlov via cfe-commits
sepavloff added a comment. Any feedback? Thanks, --Serge http://reviews.llvm.org/D15450 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D15450: Avoid double deletion in Clang driver.

2016-02-04 Thread Serge Pavlov via cfe-commits
Any feedback? Thanks, --Serge 2016-02-02 3:31 GMT+06:00 Serge Pavlov : > sepavloff updated this revision to Diff 46575. > sepavloff added a comment. > > Added regression test. > > > http://reviews.llvm.org/D15450 > > Files: > lib/CodeGen/CodeGenAction.cpp > unittests/Frontend/CMakeLists.txt

Re: [PATCH] D15450: Avoid double deletion in Clang driver.

2016-02-01 Thread Serge Pavlov via cfe-commits
sepavloff updated this revision to Diff 46575. sepavloff added a comment. Added regression test. http://reviews.llvm.org/D15450 Files: lib/CodeGen/CodeGenAction.cpp unittests/Frontend/CMakeLists.txt unittests/Frontend/CodeGenActionTest.cpp Index: unittests/Frontend/CodeGenActionTest.cpp

Re: [PATCH] D15450: Avoid double deletion in Clang driver.

2016-01-29 Thread Jonathan Roelofs via cfe-commits
On 1/29/16 12:50 PM, Serge Pavlov wrote: Crash is observed when HandleTranslation unit is not called, clang always calls this method but a clang based project may don't call it if it is not needed. I saw the crash in such project and used this patch to fix it. I do not know how to make a regres

Re: [PATCH] D15450: Avoid double deletion in Clang driver.

2016-01-29 Thread Serge Pavlov via cfe-commits
Crash is observed when HandleTranslation unit is not called, clang always calls this method but a clang based project may don't call it if it is not needed. I saw the crash in such project and used this patch to fix it. I do not know how to make a regression test, I am not even sure such test would

Re: [PATCH] D15450: Avoid double deletion in Clang driver.

2016-01-29 Thread Jonathan Roelofs via cfe-commits
On 1/29/16 11:51 AM, Serge Pavlov via cfe-commits wrote: Can somebody have a look at this fix? Thank you! Testcase? --Serge 2016-01-11 23:50 GMT+06:00 Serge Pavlov mailto:sepavl...@gmail.com>>: Any feedback? Thanks, --Serge 2015-12-11 20:24 GMT+06:00 Serge Pavlov mailto

Re: [PATCH] D15450: Avoid double deletion in Clang driver.

2016-01-29 Thread Serge Pavlov via cfe-commits
Can somebody have a look at this fix? Thank you! --Serge 2016-01-11 23:50 GMT+06:00 Serge Pavlov : > Any feedback? > > Thanks, > --Serge > > 2015-12-11 20:24 GMT+06:00 Serge Pavlov : > >> sepavloff created this revision. >> sepavloff added a subscriber: cfe-commits. >> >> Llvm module object is s

Re: [PATCH] D15450: Avoid double deletion in Clang driver.

2016-01-11 Thread Serge Pavlov via cfe-commits
Any feedback? Thanks, --Serge 2015-12-11 20:24 GMT+06:00 Serge Pavlov : > sepavloff created this revision. > sepavloff added a subscriber: cfe-commits. > > Llvm module object is shared between CodeGenerator and BackendConsumer, > in both classes it is stored as std::unique_ptr, which is not a go

[PATCH] D15450: Avoid double deletion in Clang driver.

2015-12-11 Thread Serge Pavlov via cfe-commits
sepavloff created this revision. sepavloff added a subscriber: cfe-commits. Llvm module object is shared between CodeGenerator and BackendConsumer, in both classes it is stored as std::unique_ptr, which is not a good design solution and can cause double deletion error. Usually it does not occur be