Bug 63923 - Module index can be read before a real index has been assigned
Summary: Module index can be read before a real index has been assigned
Status: RESOLVED FIXED
Alias: None
Product: PulseAudio
Classification: Unclassified
Component: core (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: pulseaudio-bugs
QA Contact: pulseaudio-bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-04-25 14:48 UTC by Tanu Kaskinen
Modified: 2013-04-29 15:50 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Tanu Kaskinen 2013-04-25 14:48:41 UTC
pa_module.index is set after calling the init() callback. Prior to that it's PA_IDXSET_INVALID. The init() callback can do things that cause hooks to be fired, and that in turn may make the module object visible to code that reads the module index.

I'm not sure what would be the best way to fix this. The simplest way would be to add the new module to pa_core.modules before calling init(), but then module indexes would be consumed also by modules that fail to load. Perhaps that's not a significant problem, though.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.