[Bug c++/82003] New: Segmentation fault building kmymoney git sources.

2017-08-28 Thread koalinux at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82003

Bug ID: 82003
   Summary: Segmentation fault building kmymoney git sources.
   Product: gcc
   Version: 5.4.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: koalinux at gmail dot com
  Target Milestone: ---

Created attachment 42056
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=42056&action=edit
segmentation fault.

Hi,

As reported here:

https://bugs.gentoo.org/show_bug.cgi?id=627814

And here:

https://bugs.kde.org/show_bug.cgi?id=384072

Taking kmymoney git sources and building it using:

$ gcc -v
Using built-in specs.
COLLECT_GCC=/usr/x86_64-pc-linux-gnu/gcc-bin/5.4.0/gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-pc-linux-gnu/5.4.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with:
/var/tmp/portage/sys-devel/gcc-5.4.0-r3/work/gcc-5.4.0/configure
--host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --prefix=/usr
--bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/5.4.0
--includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/include
--datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/5.4.0
--mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/5.4.0/man
--infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/5.4.0/info
--with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/include/g++-v5
--with-python-dir=/share/gcc-data/x86_64-pc-linux-gnu/5.4.0/python
--enable-languages=c,c++,fortran --enable-obsolete --enable-secureplt
--disable-werror --with-system-zlib --enable-nls --without-included-gettext
--enable-checking=release --with-bugurl=https://bugs.gentoo.org/
--with-pkgversion='Gentoo 5.4.0-r3 p1.3, pie-0.6.5' --enable-libstdcxx-time
--enable-shared --enable-threads=posix --enable-__cxa_atexit
--enable-clocale=gnu --enable-multilib --with-multilib-list=m32,m64
--disable-altivec --disable-fixed-point --enable-targets=all --disable-libgcj
--enable-libgomp --disable-libmudflap --disable-libssp --disable-libcilkrts
--disable-libmpx --enable-vtable-verify --enable-libvtv --enable-lto
--without-isl --enable-libsanitizer
Thread model: posix
gcc version 5.4.0 (Gentoo 5.4.0-r3 p1.3, pie-0.6.5)

Triggers a segmentation fault shown in the attachment. The code in question
seems to be:

  auto removeCellFromRow = [=](auto &&self, QStandardItem *item) -> bool {
for(auto j = 0; j < item->rowCount(); ++j) {
  auto childItem = item->child(j);
  if (childItem->hasChildren())
self(self, childItem);
  childItem->removeColumn(ixCol);
}
return true;
  };

And Gentoo community reports gcc 6.4 builds it, and KDE community says clang is
able too. My wonder is, if this is a bug or a feature not yet implemented in
the version. If it's the previous, it would be awesome to get the fix
backported, otherwise, please let me know to consider to jump to the new
version.

Thanks!

José

[Bug c++/82003] Segmentation fault building kmymoney git sources.

2017-08-28 Thread koalinux at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82003

--- Comment #1 from José Pekkarinen  ---
Created attachment 42057
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=42057&action=edit
strace of the failure

[Bug c++/82003] Segmentation fault building kmymoney git sources.

2017-08-28 Thread koalinux at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82003

--- Comment #3 from José Pekkarinen  ---
Created attachment 42060
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=42060&action=edit
preprocesed sources.

[Bug c++/82003] Segmentation fault building kmymoney git sources.

2017-08-28 Thread koalinux at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82003

--- Comment #5 from José Pekkarinen  ---
I reported that to gcc this morning:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82003

[Bug c++/82003] Segmentation fault building kmymoney git sources.

2017-08-28 Thread koalinux at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82003

--- Comment #6 from José Pekkarinen  ---
(In reply to José Pekkarinen from comment #5)
> I reported that to gcc this morning:
> 
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82003

Sorry, wrong tab.

[Bug c++/82003] [5 Regression] Segmentation fault building kmymoney git sources.

2017-08-29 Thread koalinux at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82003

--- Comment #8 from José Pekkarinen  ---
Any chance the fix would be backported to gcc 5.4.X?

[Bug c++/82003] [5 Regression] Segmentation fault building kmymoney git sources.

2017-08-29 Thread koalinux at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82003

--- Comment #10 from José Pekkarinen  ---
Not particularly, this seems to be the only piece of software in my system that
seems to use it, so I'll have to live with the elder version if this doesn't
get
backported. It would be awesome to be able to work out the problem.

[Bug c++/82003] [5 Regression] Segmentation fault building kmymoney git sources.

2017-09-17 Thread koalinux at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82003

--- Comment #11 from José Pekkarinen  ---
Created attachment 42192
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=42192&action=edit
Backport of the patch to 5.X

In case it helps, here is a patch that backports the
revision that is supposed to fix my issue.

Thanks!

José.