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

Bug 607158

Summary: =dev-util/crash-7.0.7 fail with clang -Werror,-Warray-bounds
Product: Gentoo Linux Reporter: Xuefer <xuefer>
Component: Current packagesAssignee: Doug Goldstein (RETIRED) <cardoe>
Status: RESOLVED FIXED    
Severity: normal CC: esigra
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 260867    
Attachments: build.log
emerge --info

Description Xuefer 2017-01-25 09:33:56 UTC
Created attachment 461366 [details]
build.log

linker.c:3342:1991: error: array index 2 is past the end of the array (which contains 2 elements) [-Werror,-Warray-bounds]
       if (d->literal || __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (d->pattern) && __builtin_constant_p ("*") && (__s1_len = strlen (d->pattern), __s2_len = strlen ("
*"), (!((size_t)(const void *)((d->pattern) + 1) - (size_t)(const void *)(d->pattern) == 1) || __s1_len >= 4) && (!((size_t)(const void *)(("*") + 1) - (size_t)(const void *)("*") == 1) || _
_s2_len >= 4)) ? __builtin_strcmp (d->pattern, "*") : (__builtin_constant_p (d->pattern) && ((size_t)(const void *)((d->pattern) + 1) - (size_t)(const void *)(d->pattern) == 1) && (__s1_len
= strlen (d->pattern), __s1_len < 4) ? (__builtin_constant_p ("*") && ((size_t)(const void *)(("*") + 1) - (size_t)(const void *)("*") == 1) ? __builtin_strcmp (d->pattern, "*") : (__extensi
on__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) ("*"); int __result = (((const unsigned char *) (const char *) (d->pattern))[0] - __s2[0]); if (__s1_len > 0 && __r
esult == 0) { __result = (((const unsigned char *) (const char *) (d->pattern))[1] - __s2[1]); if (__s1_len > 1 && __result == 0) { __result = (((const unsigned char *) (const char *) (d->pa
ttern))[2] - __s2[2]); if (__s1_len > 2 && __result == 0) __result = (((const unsigned char *) (const char *) (d->pattern))[3] - __s2[3]); } } __result; }))) : (__builtin_constant_p ("*") &&
 ((size_t)(const void *)(("*") + 1) - (size_t)(const void *)("*") == 1) && (__s2_len = strlen ("*"), __s2_len < 4) ? (__builtin_constant_p (d->pattern) && ((size_t)(const void *)((d->pattern
) + 1) - (size_t)(const void *)(d->pattern) == 1) ? __builtin_strcmp (d->pattern, "*") : (- (__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (d->pattern);
 int __result = (((const unsigned char *) (const char *) ("*"))[0] - __s2[0]); if (__s2_len > 0 && __result == 0) { __result = (((const unsigned char *) (const char *) ("*"))[1] - __s2[1]);
if (__s2_len > 1 && __result == 0) { __result = (((const unsigned char *) (const char *) ("*"))[2] - __s2[2]); if (__s2_len > 2 && __result == 0) __result = (((const unsigned char *) (const
char *) ("*"))[3] - __s2[3]); } } __result; })))) : __builtin_strcmp (d->pattern, "*")))); }) != 0)



i have to add -Wno-error to cflags for it to compile
Comment 1 Xuefer 2017-01-25 09:35:07 UTC
Created attachment 461368 [details]
emerge --info
Comment 2 Doug Goldstein (RETIRED) gentoo-dev 2018-03-10 21:12:13 UTC
This is fixed in a newer version. Please upgrade (I'm sure you already have as I've just forgotten to comment on the issue).