← Back to team overview

hugin-devs team mailing list archive

[Bug 1332323] Re: Fix issues reported by valgrind

 

** Patch added: "0004-Use-stack-allocated-CheckpointPixels-instead-of-scop.patch"
   https://bugs.launchpad.net/enblend/+bug/1332323/+attachment/4135147/+files/0004-Use-stack-allocated-CheckpointPixels-instead-of-scop.patch

-- 
You received this bug notification because you are a member of Hugin
Developers, which is subscribed to Enblend.
https://bugs.launchpad.net/bugs/1332323

Title:
  Fix issues reported by valgrind

Status in Enblend:
  New

Bug description:
  Hi everyone,

  I ran enblend under valgrind which reported several issues.

  The first one is a simple missing initialization.

  The other ones are mostly about bad usage of boost::scoped_ptr<>. I have two 
  different approaches to fix this:

  1. Directly write into std::string buffer instead of using a temporary char[] 
  buffer. This is guaranteed behavior by C++11, see e.g.
  http://herbsutter.com/2008/04/07/cringe-not-vectors-are-guaranteed-to-be-contiguous/#comment-483

  2. Use a boost::tokenizer. As it does not need a char[] buffer, different to
  strtok, no need to allocate one. This has the nice side effect to get rid
  of the homegrown enblend::strtoken_r tokenizer.

  Kind regards,

  Stefan

To manage notifications about this bug go to:
https://bugs.launchpad.net/enblend/+bug/1332323/+subscriptions


References