• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

ICRAR / libprofit / 290
89%
master: 90%

Build:
Build:
LAST BUILD BRANCH: devel
DEFAULT BRANCH: master
Ran 19 Oct 2018 10:02AM UTC
Jobs 1
Files 47
Run time 3s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
290

push

travis-ci

rtobar
Improving memory management in FFTRealTransform

The class constructor had a bit of an issue. The situation was like
this: the unique_ptr objects were being empty initialized in the
constructor's initializer list, then in the constructor body buffers
were being allocated, and then given to the unique_ptr objects. Right
after that process takes place there is a call that can throw
(get_effort). When it does the unique_ptr objects are destroyed, as
part of the winding back of the constructor method. The issue was that
the assignment of the memory into the unique_ptr objects was not
required to have happened because the compiler was free to re-order some
of these statements. If that happens, then some of the memory that was
allocated but not wrapped into the unique_ptr would have been dangling.
I believe this was the cause of the error I was seeing in the MSVC
builds, and that could have affected other compilers anyway.

The solution is obviously to be more strict about how and when we
allocate and deallocate the memory wrapped by the unique pointers. With
this change we now: a) initialize the unique pointers in the initializer
list of the constructor, and b) use a deleter object for automatic
management of the proper destruction of the underlying pointer. This
second point makes it unnecessary also to have custom logic in the
destructor of the FFTRealTransform class.

We could have something similar for the plan objects, but we're tackling
one at a time I guess.

Signed-off-by: Rodrigo Tobar <rtobar@icrar.org>

13 of 13 new or added lines in 2 files covered. (100.0%)

1543 of 1745 relevant lines covered (88.42%)

2335104.57 hits per line

Jobs
ID Job ID Ran Files Coverage
6 290.6 (COMPILER=g++-6 CXXFLAGS="-coverage" LDFLAGS="-coverage") 19 Oct 2018 10:02AM UTC 0
88.42
Travis Job 290.6
Source Files on build 290
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #290
  • ed8a5550 on github
  • Prev Build on devel (#288)
  • Next Build on devel (#291)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc