Date: Sat, 25 Aug 2012 00:55:34 +0600 From: agent <agentprog@...il.com> To: musl@...ts.openwall.com Subject: Re: build musl with clang 24.08.2012 23:51, Rich Felker пишет: > Yes. To clarify, the issue is not that clang is assuming the object > obtained by malloc has indeterminate value. The issue is that clang is > assuming the pointer malloc returns points to an object of size N > beginning at the returned address, and thus that the [-1] index is > invalid pointer arithmetic. This is a malloc-specific assumption and > wrong for freestanding mode where malloc is just an ordinary function > (which is allowed to return a pointer into the middle of an array, > which is what it's doing). i will report this to clang's list (or maybe directly to bugzilla?) as soon as i get a subscription confirmation. but i have noticed that not only 'if (p[-1])' gets wiped out but any 'if (p[i])'. though the nature of this i suppose the same
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.