hugin-devs team mailing list archive
-
hugin-devs team
-
Mailing list archive
-
Message #05171
[Bug 1332323] [NEW] Fix issues reported by valgrind
Public bug reported:
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
** Affects: enblend
Importance: Undecided
Status: New
** Patch added: "0001-explicitly-clear-sa_flags-for-signal-handler.patch"
https://bugs.launchpad.net/bugs/1332323/+attachment/4135144/+files/0001-explicitly-clear-sa_flags-for-signal-handler.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
Follow ups
-
[Bug 1332323] Re: Fix issues reported by valgrind
From: Christoph Spiel, 2016-03-30
-
[Bug 1332323] Re: Fix issues reported by valgrind
From: Christoph Spiel, 2014-09-05
-
[Bug 1332323] Re: Fix issues reported by valgrind
From: Stefan Bruens, 2014-09-02
-
[Bug 1332323] Re: Fix issues reported by valgrind
From: Stefan Bruens, 2014-09-02
-
[Bug 1332323] Re: Fix issues reported by valgrind
From: Stefan Bruens, 2014-09-02
-
[Bug 1332323] Re: Fix issues reported by valgrind
From: Christoph Spiel, 2014-08-27
-
[Bug 1332323] Re: Fix issues reported by valgrind
From: Christoph Spiel, 2014-06-23
-
[Bug 1332323] Re: Fix issues reported by valgrind
From: Stefan Bruens, 2014-06-19
-
[Bug 1332323] Re: Fix issues reported by valgrind
From: Stefan Bruens, 2014-06-19
-
[Bug 1332323] Re: Fix issues reported by valgrind
From: Stefan Bruens, 2014-06-19
-
[Bug 1332323] [NEW] Fix issues reported by valgrind
From: Stefan Bruens, 2014-06-19
References