Giter Site home page Giter Site logo

Comments (6)

GoogleCodeExporter avatar GoogleCodeExporter commented on May 19, 2024
hmmm, curious.  Does the program run without segfault when you run it normally 
--
that is, not in valgrind?

The line in question that valgrind seems to be complaining is this one:
  flag_ = new CommandLineFlag(name, help, filename, current, defvalue);

It's in a constructor, so flag_ isn't going to be at 0x0, and I don't know why
valgrind would care if any of the ComandLineFlag arguments were at 0x0, so I'm
confused as to what it's complaining about.  Is there a way to get valgrind to 
emit
more information about what it's thinking?

Original comment by [email protected] on 13 Aug 2007 at 7:51

from gflags.

GoogleCodeExporter avatar GoogleCodeExporter commented on May 19, 2024
Yes, it segfaults when not run through valgrind.  I'm using g++ (GCC) 4.0.3 
(Ubuntu
4.0.3-1ubuntu5).

I don't know how to get valgrind to emit more information, but I tried a few 
more
simple tests.  The same error is raised if I:

- use a non-empty string default
- pass false instead of true for ParseCommandLineFlags
- remove the bool flag
- remove the string flag
- remove both flags

Original comment by [email protected] on 13 Aug 2007 at 8:16

from gflags.

GoogleCodeExporter avatar GoogleCodeExporter commented on May 19, 2024
(I got access to the machine to run the binary.)  Looking at this closer, the 
problem
is that you didn't link in -pthread to your application.  I thought in such 
cases,
glibc put in a dummy pthread implementation (or its own?), but apparently that
doesn't work here, or at least not well.

I'll see if I can get a good workaround for the next release.

Original comment by [email protected] on 13 Aug 2007 at 9:10

  • Changed state: Accepted

from gflags.

GoogleCodeExporter avatar GoogleCodeExporter commented on May 19, 2024
I've narrowed down the problem further to a pthread_once call, and have figured 
out a
way to remove it.  I'll make a new release soon

Original comment by [email protected] on 13 Aug 2007 at 9:34

  • Changed state: Started

from gflags.

GoogleCodeExporter avatar GoogleCodeExporter commented on May 19, 2024
This should be fixed in gflags 0.6

Original comment by [email protected] on 31 Aug 2007 at 4:24

  • Changed state: Fixed

from gflags.

GoogleCodeExporter avatar GoogleCodeExporter commented on May 19, 2024
Confirmed fixed in version 0.6.

Original comment by [email protected] on 31 Aug 2007 at 4:59

from gflags.

Related Issues (20)

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.