Clang 8 double-free bug

Martijn Otto martijntje at martijnotto.nl
Tue Oct 29 19:45:23 GMT 2019


On Tue, 2019-10-29 at 17:31 +0100, Sylvestre Ledru wrote:
> Hello,
> 
> Le 29/10/2019 à 15:46, Martijn Otto a écrit :
> > Hello,
> > 
> > I recently ran into a show-stopper bug in clang 8. The bug-report
> > for
> > it can be found at https://bugs.llvm.org/show_bug.cgi?id=41810.
> > This
> > bug causes destructor of captured variables in a lambda to be
> > called
> > twice if an exception is thrown in its body.
> > 
> > The fix for it is simple, to apply commit
> > https://github.com/llvm-mirror/clang/commit/08d0c133ccb1b530ed743a021dc5995fbcdaf012
> > 
> > In the bug report I asked for another point-release of clang 8, but
> > it
> > appears they are unable to do so due to time constraints.
> > 
> > Could we have a fixed package at least for buster?
> I don't fill comfortable taking this patch in Debian stable.
> It isn't that small and afaik, it wasn't tested against the 8 branch.
> In parallel, this is a concern case (sorry if this impacts you)
> 
> Instead, why do you use the 9 branch backport from?
> https://apt.llvm.org/
> 
> It should have the fix.
> 
> Sorry,
> Sylvestre

Hi Sylvestre,

I know I can use clang 9. It's not the issue here. It's more that 8 is
the officially supported version in buster and so a lot of people will
be using it.

I now run the test-case from the mentioned bug during CMake configure
step in my projects, so that I can abort builds on affected systems
instead of having them suddenly segfault at the worst possible time.

I'll grant you that the patch is not _very_ small, but about half of it
is a test-case being added to clang.

I do understand your concern about keeping stable stable. I also know
that backporting fixes is the way debian often chooses to work, so this
seemed like the way to go.

I understand if the change feels too big for you. My argument against
that is that the current state is broken and we should find a way to
fix it.

With regards,
Martijn Otto
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part
URL: <http://alioth-lists.debian.net/pipermail/pkg-llvm-team/attachments/20191029/97dab46b/attachment.sig>


More information about the Pkg-llvm-team mailing list