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

xmms2 / xmms2-devel
54%

Build:
DEFAULT BRANCH: master
Repo Added 30 Jan 2015 02:55PM UTC
Files 103
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

LAST BUILD ON BRANCH master
branch: SELECT
CHANGE BRANCH
x
  • No branch selected
  • coverity_scan
  • master
  • test

pending completion
26

Pull #5

travis-ci

web-flow
OTHER: fix c++ client dangling reference

On #xmm2 Chewi reported c++/tut7 to be broken at start:

```
GLib-WARNING **: glib-2.56.2/glib/giounix.c:410
Error while getting flags for FD: Bad file descriptor (9)
```

valgrind shows the problem as read of uninitialized data:

```
$ valgrind ./tut7

==32268== Conditional jump or move depends on uninitialised value(s)
==32268==    at 0x49DC36B: xmmsc_mainloop_gmain_init (xmmsclient-glib.c:80)
==32268==    by 0x49E11BE: Xmms::GMainloop::GMainloop(xmmsc_connection_St*) (xmmsclient++-glib.cpp:11)
==32268==    by 0x10C64D: main (in /home/slyfox/dev/git/xmms2-devel/doc/tutorial/c++/tut7)
==32268==  Uninitialised value was created by a stack allocation
==32268==    at 0x49E119A: Xmms::GMainloop::GMainloop(xmmsc_connection_St*) (xmmsclient++-glib.cpp:8)
```

This happens due to use of dangling C++ reference to stack variable:

```
// somewhere in src/include/xmmsclient/xmmsclient++/mainloop.h
class MainloopInterface {
    MainloopInterface( xmmsc_connection_t* conn ) :
        running_( false ), conn_( conn ) { }
  protected:
    bool running_;
    xmmsc_connection_t*& conn_;
}
```

Note: `conn_` refers to dangling local variable of
`MainloopInterface::MainloopInterface` constructor.

The fix is to pass through pointer reference.
`MainLoop::MainLoop()` already does it.

Reported-by: James Le Cuirot
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
Pull Request #5: OTHER: fix c++ client dangling reference

6686 of 12465 relevant lines covered (53.64%)

200.95 hits per line

Relevant lines Covered
Build:
Build:
12465 RELEVANT LINES 6686 COVERED LINES
200.95 HITS PER LINE
Source Files on master
Detailed source file information is not available for this build.

Recent builds

Builds Branch Commit Type Ran Committer Via Coverage
26 master OTHER: fix c++ client dangling reference On #xmm2 Chewi reported c++/tut7 to be broken at start: ``` GLib-WARNING **: glib-2.56.2/glib/giounix.c:410 Error while getting flags for FD: Bad file descriptor (9) ``` valgrind shows the problem as rea... Pull #5 06 Dec 2018 07:38AM UTC web-flow travis-ci pending completion  
25 master BUG(2612): Support building SC68 from SVN code. Pull #4 02 Dec 2018 10:28PM UTC web-flow travis-ci pending completion  
24 master OTHER: Allow a single xform to be created instead of a full chain This results in the xform tests passing. Pull #3 31 Oct 2017 12:56PM UTC web-flow travis-ci pending completion  
22 master plugins: mac: support newer mac API version Pull #2 24 Oct 2017 10:52PM UTC web-flow travis-ci pending completion  
21 master OTHER: _xmmsv_dict_hash: make hash function endianness-agnostic The following code: uint32_t k; memcpy (&k, data, sizeof (k)); computes different data depending on platform endianness. That causes test_xmmsv_serialize_coll_match test to ... push 27 Aug 2017 08:08PM UTC dsvensson travis-ci pending completion  
20 master OTHER: Only push to xmms2-docs if env set. push 26 May 2017 01:54PM UTC dsvensson travis-ci pending completion  
19 test OTHER: Only push to xmms2-docs if env set. push 26 May 2017 01:38PM UTC dsvensson travis-ci pending completion  
18 master OTHER: Add Sebastian Andrzej Siewior to AUTHORS. push 22 Nov 2016 10:14PM UTC dsvensson travis-ci pending completion  
17 master FEATURE(2596): Sort "xmms2 info" output by prop. push 22 Nov 2016 09:28PM UTC dsvensson travis-ci pending completion  
16 test FEATURE(2596): Sort "xmms2 info" output by prop. push 22 Nov 2016 09:08PM UTC dsvensson travis-ci pending completion  
See All Builds (20)
  • Repo on GitHub
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