Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix datatype passed to LOG() on x86_64 systems #9

Merged
merged 1 commit into from
Sep 13, 2011

Conversation

manio
Copy link
Contributor

@manio manio commented Sep 12, 2011

I am sending you the last bugfix for the error detected with valgrind. The xvdr plugin doesn't generate any more errors on my system (besides some errors in libz.so - but this is another story).

regards :)

The value passed to LOG() function was formatted as %lu,
which on my 64-bit system leads to read uninitialised value,
like this following line in log file:
NOTICE: AddOnLog: VDR VNSI Client: Logged in at '1305641887+7200' to 'VDR-Network-Streaming-Interface (VNSI) Server' Version: '0.0.1' with protocol version '140685948747778'

valgrind snipset for this error:
==21758== Use of uninitialised value of size 8
==21758==    at 0xC91EF0B: _itoa_word (_itoa.c:195)
==21758==    by 0xC9213B6: vfprintf (vfprintf.c:1619)
==21758==    by 0xC9433B8: vsprintf (iovsprintf.c:43)
==21758==    by 0x1DC30D72: XBMC_log (libXBMC_addon.cpp:75)
==21758==    by 0x1DA281DB: cXVDRSession::Login() (in /usr/local/lib/xbmc/addons/pvr.vdr.xvdr/XBMC_VDR_xvdr.pvr)
==21758==    by 0x1DA235B8: cXVDRData::Login() (in /usr/local/lib/xbmc/addons/pvr.vdr.xvdr/XBMC_VDR_xvdr.pvr)
==21758==    by 0x1DA1F8D8: ADDON_Create (in /usr/local/lib/xbmc/addons/pvr.vdr.xvdr/XBMC_VDR_xvdr.pvr)
==21758==    by 0x84A865: ADDON::CAddonDll<DllPVRClient, PVRClient, PVR_PROPERTIES>::Create() (AddonDll.h:200)
==21758==    by 0x8448EA: PVR::CPVRClient::Create(int) (PVRClient.cpp:107)
==21758==    by 0x84EFC3: PVR::CPVRClients::InitialiseClient(boost::shared_ptr<ADDON::IAddon>) (PVRClients.cpp:1109)
==21758==    by 0x8523F8: PVR::CPVRClients::UpdateAndInitialiseClients(bool) (PVRClients.cpp:1149)
==21758==    by 0x852682: PVR::CPVRClients::Process() (PVRClients.cpp:1199)
==21758==
==21758== Conditional jump or move depends on uninitialised value(s)
==21758==    at 0xC91EF15: _itoa_word (_itoa.c:195)
==21758==    by 0xC9213B6: vfprintf (vfprintf.c:1619)
==21758==    by 0xC9433B8: vsprintf (iovsprintf.c:43)
==21758==    by 0x1DC30D72: XBMC_log (libXBMC_addon.cpp:75)
==21758==    by 0x1DA281DB: cXVDRSession::Login() (in /usr/local/lib/xbmc/addons/pvr.vdr.xvdr/XBMC_VDR_xvdr.pvr)
==21758==    by 0x1DA235B8: cXVDRData::Login() (in /usr/local/lib/xbmc/addons/pvr.vdr.xvdr/XBMC_VDR_xvdr.pvr)
==21758==    by 0x1DA1F8D8: ADDON_Create (in /usr/local/lib/xbmc/addons/pvr.vdr.xvdr/XBMC_VDR_xvdr.pvr)
==21758==    by 0x84A865: ADDON::CAddonDll<DllPVRClient, PVRClient, PVR_PROPERTIES>::Create() (AddonDll.h:200)
==21758==    by 0x8448EA: PVR::CPVRClient::Create(int) (PVRClient.cpp:107)
==21758==    by 0x84EFC3: PVR::CPVRClients::InitialiseClient(boost::shared_ptr<ADDON::IAddon>) (PVRClients.cpp:1109)
==21758==    by 0x8523F8: PVR::CPVRClients::UpdateAndInitialiseClients(bool) (PVRClients.cpp:1149)
==21758==    by 0x852682: PVR::CPVRClients::Process() (PVRClients.cpp:1199)
@pipelka
Copy link
Owner

pipelka commented Sep 13, 2011

Merged.
Thanks.

pipelka added a commit that referenced this pull request Sep 13, 2011
Fix datatype passed to LOG() on x86_64 systems
@pipelka pipelka merged commit eb05616 into pipelka:master Sep 13, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants