Giter Club home page Giter Club logo

Comments (11)

gbonacini avatar gbonacini commented on May 16, 2024

Hi syrius01,

I guess that your compiler doesn't support the 2011 C++ standard, to check if it's the case, could you provide the output of the following command ?

g++ -v

Thanks,

G.

from cve-2016-5195.

syrius01 avatar syrius01 commented on May 16, 2024

Using built-in specs.
Target: x86_64-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre --enable-libgcj-multifile --enable-java-maintainer-mode --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib --with-ppl --with-cloog --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux
Thread model: posix
gcc version 4.4.7 20120313 (Red Hat 4.4.7-16) (GCC)

from cve-2016-5195.

gbonacini avatar gbonacini commented on May 16, 2024

Hi syrius01,
g++ 4.4 is too old and doesn't support the c++11 standard, it was officially added in a later version, but there is an hope, accordingly with the version 4.4 manual an experimental support to the c++11 is present and can be activated with the -std=c++0x flag:

"GCC provides experimental support for the upcoming ISO C++ standard, C++0x. This support can be enabled with the -std=c++0x or -std=gnu++0x compiler options; the former disables GNU extensions".

So you should substitute -std=c++11 with -std=c++0x to do the experiment. Could you try this way and let me know ?

G.

from cve-2016-5195.

syrius01 avatar syrius01 commented on May 16, 2024

Sounds great ! I will try it as soon as I leave from work, should try it tonight. Will keep you up to date. Thanks !

from cve-2016-5195.

syrius01 avatar syrius01 commented on May 16, 2024

g++ -Wall -pedantic -O2 -std=gnu++0x -pthread -o dcow dcow.cpp -lutil
<++ -Wall -pedantic -O2 -std=gnu++0x -pthread -o dcow dcow.cpp -lutil
dcow.cpp: In constructor β€˜Dcow::Dcow(bool, bool)’:
dcow.cpp:74: error: β€˜nullptr’ was not declared in this scope
dcow.cpp: In member function β€˜int Dcow::expl()’:
dcow.cpp:114: error: expected primary-expression before β€˜[’ token
dcow.cpp:114: error: expected primary-expression before β€˜]’ token
dcow.cpp:115: error: expected primary-expression before β€˜[’ token
dcow.cpp:115: error: expected primary-expression before β€˜]’ token
dcow.cpp:119: error: expected primary-expression before β€˜[’ token
dcow.cpp:119: error: expected primary-expression before β€˜]’ token
dcow.cpp:138: error: β€˜nullptr’ was not declared in this scope
dcow.cpp:208: error: expected primary-expression before β€˜[’ token
dcow.cpp:208: error: expected primary-expression before β€˜]’ token
dcow.cpp:208: error: expected primary-expression before β€˜int’
dcow.cpp:208: error: expected primary-expression before β€˜bool’
dcow.cpp:208: error: expected β€˜;’ before β€˜{’ token
dcow.cpp:209: error: β€˜shell’ was not declared in this scope
dcow.cpp:210: error: β€˜ret’ was not declared in this scope
dcow.cpp:212: warning: left-hand operand of comma has no effect

from cve-2016-5195.

syrius01 avatar syrius01 commented on May 16, 2024

g++ -Wall -pedantic -O2 -std=c++0x -pthread -o dcow dcow.cpp -lutil
<++ -Wall -pedantic -O2 -std=c++0x -pthread -o dcow dcow.cpp -lutil
dcow.cpp: In constructor β€˜Dcow::Dcow(bool, bool)’:
dcow.cpp:74: error: β€˜nullptr’ was not declared in this scope
dcow.cpp: In member function β€˜int Dcow::expl()’:
dcow.cpp:114: error: expected primary-expression before β€˜[’ token
dcow.cpp:114: error: expected primary-expression before β€˜]’ token
dcow.cpp:115: error: expected primary-expression before β€˜[’ token
dcow.cpp:115: error: expected primary-expression before β€˜]’ token
dcow.cpp:119: error: expected primary-expression before β€˜[’ token
dcow.cpp:119: error: expected primary-expression before β€˜]’ token
dcow.cpp:138: error: β€˜nullptr’ was not declared in this scope
dcow.cpp:208: error: expected primary-expression before β€˜[’ token
dcow.cpp:208: error: expected primary-expression before β€˜]’ token
dcow.cpp:208: error: expected primary-expression before β€˜int’
dcow.cpp:208: error: expected primary-expression before β€˜bool’
dcow.cpp:208: error: expected β€˜;’ before β€˜{’ token
dcow.cpp:209: error: β€˜shell’ was not declared in this scope
dcow.cpp:210: error: β€˜ret’ was not declared in this scope
dcow.cpp:212: warning: left-hand operand of comma has no effect

from cve-2016-5195.

gbonacini avatar gbonacini commented on May 16, 2024

Hi syrius01,

eh, sadly not all the C++11 new features are supported by your compiler (It seems there is not support for 'nullptr' and the lambdas). I'll try to add a "legacy" version of the program in this code branch in the next days replacing those C++11 parts with the "old fashion" C++ code.

G.

from cve-2016-5195.

syrius01 avatar syrius01 commented on May 16, 2024

That would be awesome! Keep me posted when it will be available please. Thank you for your time !

from cve-2016-5195.

gbonacini avatar gbonacini commented on May 16, 2024

Hi syrius01,

I've just released in the "legacy" folder the "no-c++11" version. Could you try to compile it on your environment providing any error or warning ?

G.

from cve-2016-5195.

syrius01 avatar syrius01 commented on May 16, 2024

It compiles perfectly without any warnings ! Thanks for your time again gbonacini πŸ‘

from cve-2016-5195.

gbonacini avatar gbonacini commented on May 16, 2024

Ok, I close the issue putting RHEL 4 in the compatibility list.

from cve-2016-5195.

Related Issues (7)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.