Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 663498

Summary: xfce-extra/xfce4-datetime-plugin-0.7.0 with ABI_X86=x32 shows incorrect time and date
Product: Gentoo Linux Reporter: camper <theonetruecamper>
Component: Current packagesAssignee: XFCE Team <xfce>
Status: UNCONFIRMED ---    
Severity: normal CC: jstein
Priority: Normal Keywords: PATCH
Version: unspecified   
Hardware: AMD64   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 393673    
Attachments: xfce4-datetime-plugin-0.7.0-x32-fix-GTimeVal-time_t-conversion.patch

Description camper 2018-08-13 10:07:41 UTC
Created attachment 543242 [details]
xfce4-datetime-plugin-0.7.0-x32-fix-GTimeVal-time_t-conversion.patch

When converting values from a GTimeVal struct to time_t the plugin uses a pointer-cast assuming that time_t has the same size as long. This assumption does not hold for this ABI with glibc where time_t is still a 64-bit value but long has only 32 bit (default/linux/amd64/17.0/x32 profile). As a result the conversion pulls in the microseconds field from GTimeVal giving quasi-random date and time values.