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

google / shaderc / 1222
95%

Build:
DEFAULT BRANCH: master
Ran 18 Jun 2018 10:10PM UTC
Jobs 1
Files 44
Run time 6s
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
1222

push

travis-ci

dneto0
Add virtual dtor to classes with virtual functions

IncluderInterface has virtual functions but does not have a virtual
destructor. This class is derived from by FileIncluder w hich overrides
those functions.

Because there is an interface in use here, it is safe to assume some
container is storing IncluderInterface*. If the container instead held
FileIncluder* then the virtual functions wouldn't be needed.

This causes a problem since FileIncluder has member variables. The
destructor of FileIncluder knows to also destruct those member variables
(including deallocating their dynamically allocated memory).

But when IncluderInterface's destructor is called, it is not virtual and
will not call FileIncluder's destructor. So these member variables are
never destroyed and their dynamically allocated memory will be leaked.

In this case, FileIncluder stores a std::unordered_set<std::string>
which will be leaked.

This patch adds a virtual destructor to IncluderInterface to make sure
FileIncluder's destructor is called and this memory isn't leaked.

Use =default and don't redeclare IncluderInterface's dtor

1970 of 2063 relevant lines covered (95.49%)

2172.96 hits per line

Jobs
ID Job ID Ran Files Coverage
7 1222.7 (SHADERC_CODE_COVERAGE=ON) 18 Jun 2018 10:10PM UTC 0
95.49
Travis Job 1222.7
Source Files on build 1222
  • Tree
  • List 0
  • Changed 8
  • Source Changed 2
  • Coverage Changed 8
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Travis Build #1222
  • 30af9f98 on github
  • Prev Build on master (#1218)
  • Next Build on master (#1233)
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

© 2025 Coveralls, Inc