Date: Wed, 31 Jul 2013 20:27:56 -0400 From: Rich Felker <dalias@...ifal.cx> To: musl@...ts.openwall.com Subject: Warning: gcc 4.8.x may miscompile musl 0.9.12; workaround Hi, In connection to the discussion on ARM memcpy and GCC generating an infinite-self-recursive memcpy, I've now had at least one report of the issue affecting memset too. The relevant GCC ticket is: http://gcc.gnu.org/bugzilla//show_bug.cgi?id=56888 The problem occurred with GCC 4.8.1 on x86_64. I'm not sure which archs are affected, but as memset is a widely-used function, you'll know right away if you are affected. The problem seems to coincide with commit a80847d86a8865a78fdbebe7f9e2533f7a74e010, which added the ability (enabled by default) to compile certain parts of musl selectively with the -O3 optimization level; string functions are included by default. Passing --enable-optimize=fast to configure is an easy workaround for the problem. Another solution may be to add custom CFLAGS containing -fno-tree-loop-distribute-patterns as suggested in the GCC tracker thread. Note that earlier versions of musl are also affected if you manually enable -O3. This will definitely be fixed in the next release, even though it's really a GCC bug. Rich
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.