|
Message-ID: <5038693C.2020101@gmail.com> Date: Sat, 25 Aug 2012 11:57:16 +0600 From: agent <agentprog@...il.com> To: musl@...ts.openwall.com Subject: Re: build musl with clang 25.08.2012 06:09, Rich Felker пишет: > Here's an idea for a workaround: > > void *not_called_malloc(size_t) __asm__("malloc"); > #define malloc not_called_malloc > > If that fixes it, it would be an amusing way to present it in the bug > report. > > Rich that is stilled optimized for a plain malloc call even if i call not_called_malloc directly and not via a macro. to test the bug i used the following function: void *foo(size_t n) { static char buf[200]; return buf + 10; } and that was the way when 'if' was not optimized out. if i use malloc in foo() it is still wiped out. as far as i know, optimizations are done not only in clang itself but in llvm too, so maybe if clang does not notice malloc, llvm does.
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.