libunwind-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Libunwind-devel] [patch] Fix Clang-detected incorrect memset


From: Paul Pluzhnikov
Subject: [Libunwind-devel] [patch] Fix Clang-detected incorrect memset
Date: Sun, 2 Oct 2011 19:07:47 -0700

Greetings,
I've tried to build libunwind with Clang, which produced:
src/x86/Gget_save_loc.c:114:28: error: argument to 'sizeof' in
'memset' call is the same expression as the destination; did you mean
to dereference it? [-Werror,-Wsizeof-pointer-memaccess]  memset (sloc,
0, sizeof (sloc));          ~~~~             ^~~~

This does look like a bug to me.
I've audited other memset() calls, and believe there was one more bug
of the same kind.
Tested on Linux/x86_64; no new failures.
Thanks,-- Paul Pluzhnikov

Attachment: libunwind-memset-20111002.txt
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]