bugGNU CSSC - Bugs: bug #54497, [patch] mylist implementation...


bug #54497: [patch] mylist implementation error segfaults with g++-8

Submitted by:  Yann Dirson <ydirson>
Submitted on:  Sat 11 Aug 2018 09:37:53 PM UTC  
Category:  None Severity:  3 - Normal
Item Group:  None Status:  Fixed
Privacy:  Public Assigned to:  James Youngman <jay>
Open/Closed:  Closed

Add a New Comment (Rich Markup)

You are not logged in

Please log in, so followups can be emailed to you.


Sat 11 May 2019 06:37:24 AM UTC, comment #2: 

That code was eliminated in CSSC release 1.4.1 (replaced with std::vector).

James Youngman <jay>
Project AdministratorIn charge of this item.
Sun 05 May 2019 08:21:26 PM UTC, comment #1: 

Hmm, I think a release is overdue.  

mylist.h (at git head is now basically just this:

#ifndef CSSC__LIST_H__
#define CSSC__LIST_H__

#include <vector>

template<class TYPE> using mylist = std::vector<TYPE>;

#endif /* CSSC__LIST_H__ */

James Youngman <jay>
Project AdministratorIn charge of this item.
Sat 11 Aug 2018 09:37:53 PM UTC, original submission:  

With g++-8 self-tests fail with:

[ RUN      ] MylistTest.Catenate
Segmentation fault

This is due to operator+= and -= not returning anything, looks like it only ever worked by chance with previous versions of the compiler - g++ does show a warning where the problems are:

unit-tests$ make CC=gcc-8 CXX=g++-8 test_mylist
g++-8 -DHAVE_CONFIG_H -I. -I..  -I./googletest//include -pthread -I./../src  -pthread -DGTEST_HAS_PTHREAD=1 -g -O2 -MT test_mylist.o -MD -MP -MF .deps/test_mylist.Tpo -c -o test_mylist.o test
In file included from test_mylist.cc:24:
./../src/mylist.h: In instantiation of ‘const mylist<TYPE>& mylist<TYPE>::operator+=(const mylist<TYPE>&) [with TYPE = int]’:
test_mylist.cc:70:8:   required from here
./../src/mylist.h:106:3: warning: no return statement in function returning non-void [-Wreturn-type]
./../src/mylist.h: In instantiation of ‘const mylist<TYPE>& mylist<TYPE>::operator-=(const mylist<TYPE>&) [with TYPE = int]’:
test_mylist.cc:82:8:   required from here
./../src/mylist.h:125:3: warning: no return statement in function returning non-void [-Wreturn-type]
mv -f .deps/test_mylist.Tpo .deps/test_mylist.Po

Bug-Debian: https://bugs.debian.org/897731
Last-Update: 2018-08-11

--- cssc-1.4.0.orig/src/mylist.h
+++ cssc-1.4.0/src/mylist.h
@@ -103,6 +103,7 @@ public:
+    return *this;

   const mylist<TYPE>& operator-=(const mylist& other)
@@ -122,6 +123,7 @@ public:
+    return *this;

Yann Dirson <ydirson>


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by jay (Posted a comment)
  • -email is unavailable- added by ydirson (Submitted the item)

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.




    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-05-11 jay Open/ClosedOpen => Closed
    2019-05-05 jay StatusNone => Fixed
        Assigned toNone => jay

    Back to the top

    Powered by Savane 3.5