script plugin, i386, Ubuntu and a crazy regression
Steve Langasek
steve.langasek at canonical.com
Fri Jun 28 11:05:40 PDT 2013
On Fri, Jun 28, 2013 at 09:15:33AM -0400, Ray Strode wrote:
> On Thu, Jun 27, 2013 at 5:23 PM, Steve Langasek <
> steve.langasek at canonical.com> wrote:
> > Hi folks,
> > In Ubuntu 13.04, which ships with plymouth 0.8.8 and by default uses a
> > theme
> > that uses the script plugin, we are seeing reports that text labels are not
> > displayed on x86 (32-bit).
> Only 32-bit ? interesting.
> > I've tracked this regression down to a single commit upstream,
> > 3f8bd998dcc6d592ffd5d3aefad06f0bbf28a725, which adds a single line of
> > initialization code to the script plugin's math library:
> > srand ((int) ply_get_timestamp ());
> > It is utterly bewildering that this line has a side effect of causing text
> > to not be displayed.
> > Worse, it's not the srand() call that triggers it... if I just call
> > ply_get_timestamp() and discard the result, the problem is still
> > reproducible.
> So ply_get_timestamp() returns a double which is a 64-bit type.
> Maybe a missing #include "ply-utils.h" or something like that is (somehow)
> triggering the problem?
> Still not clear why this problem would manifest that way, but usually
> 32-bit only problems are something like a missing include or similar. Does
> compiling with optimization disabled "fix" it? Hand waving, withouth really
> knowing, i'll say it could be the compiler is making assumptions during the
> optimization process that aren't holding true because of the missing
> prototype and the impliciit return type.
Oh, sure enough:
CC script_la-script-lib-math.lo
./script-lib-math.c: In function 'script_lib_math_setup':
./script-lib-math.c:93:3: warning: implicit declaration of function 'ply_get_timestamp' [-Wimplicit-function-declaration]
./script-lib-math.c:84:10: warning: variable 'timestamp' set but not used [-Wunused-but-set-variable]
Wow, very surprising (to me) that this has such an effect even when
discarding the result of the function. And shame on me for not looking at
the build logs!
Adding the missing include fixes the failure. Thanks for the hint - patch
attached.
> Has anyone seen such such behavior on other distributions? Anyone have any
> > insight into what mysterious side effects of ply_get_timestamp() - but only
> > when called as a library function - are breaking display of strings via
> > pango?
> Another thought is the label plugin is failing to load. debug text should
> show the dlerror() from the failure if that's happening. Maybe adding an
> explicit -lrt somewhere is needed?
The label plugin was definitely loading fine, which made it all the more
confusing. :)
--
Steve Langasek Give me a lever long enough and a Free OS
Debian Developer to set it on, and I can move the world.
Ubuntu Developer http://www.debian.org/
slangasek at ubuntu.com vorlon at debian.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Fix-missing-prototype-of-ply_get_timestamp.patch
Type: text/x-diff
Size: 975 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/plymouth/attachments/20130628/c0c0f364/attachment.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.freedesktop.org/archives/plymouth/attachments/20130628/c0c0f364/attachment.pgp>
More information about the plymouth
mailing list