Bug 8809 - gcc 5.2: armv5te: vsprintf appends unwanted ' ' spaces
Summary: gcc 5.2: armv5te: vsprintf appends unwanted ' ' spaces
Status: RESOLVED OBSOLETE
Alias: None
Product: Kernel
Classification: Yocto Project Subprojects
Component: linux-yocto (show other bugs)
Version: 2.0
Hardware: Other arm
: Medium normal
Target Milestone: 2.2
Assignee: Andreas Fenkart
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2015-12-15 08:39 UTC by Andreas Fenkart
Modified: 2016-05-07 00:06 UTC (History)
0 users

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments
workaround (1.63 KB, patch)
2015-12-15 08:39 UTC, Andreas Fenkart
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Fenkart 2015-12-15 08:39:59 UTC
Created attachment 2900 [details]
workaround

compiling kernel with yocto gcc 5.2 produces non functional kernel. 

compiled same source tree, standalone with gcc4.5[2] and through yocto with recipe[3] with gcc5.2[4]. 

output from gcc5.2 contains random spaces in output: 
PID hash table entries: 256 (order: -2, 1024 bytes) <- gcc 4.5
PID  hash table entries: 256 (order: -2, 1024 bytes) <- gcc 5.2

Dentry cache hash table entries: 8192 (order: 3, 32768 bytes) <- gcc 4.5
Dentry cache  hash table entries: 8192 (order: 3, 32768 bytes) <- gcc 5.2

It seems the spaces are introduced when a comparison between s16 and int incorrectly evaluates to true, see attached bug

[1] https://git.digitalstrom.org/bsp/linux/tree/digitalStrom-imx6_4.1
[2] gcc version 4.9.3 20141031 (prerelease) (Linaro GCC 2014.11)
[3] https://git.digitalstrom.org/dss-oe/dss-oe/blob/master/yocto/dS/meta-digitalstrom-devel/recipes-kernel/linux/linux-rescue_4.1.0.bb
[4] arm-poky-linux-gnueabi-gcc (GCC) 5.2.0

# uname -a
Linux dSS-kit 4.1.4+ #213 PREEMPT Tue Dec 15 09:23:56 CET 2015 armv5tejl GNU/Linux

Machine: Atmel AT91SAM9G20EK Development Platform
Comment 1 Khem Raj 2016-01-09 10:43:17 UTC
can you try gcc 5.3 from master ?
or backport https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67442
see if it helps
Comment 2 Stephen K Jolley 2016-05-05 15:24:06 UTC
Andreas can you answer Kim's question.
Comment 3 Andreas Fenkart 2016-05-07 00:06:17 UTC
Bug disappeared when upgrading to 4.1.19. I bisected it to this commit:

https://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/commit/?id=a077224fd35b2f7fbc93f14cf67074fc792fbac2

It's a workaround, disables an optimization. This is the GCC bug:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65932

It says it's fixed for GCC 5.4 and GCC 6