-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
llvm: Use-of-uninitialized-value in __gxx_personality_v0 #1099
Comments
@eugenis any ideas why this might be happening? The top frames show:
|
Maybe we should be using |
The unwinder flags might help...
I assume this is MSan? I don't have access to the bugs.
…On Sun, Jan 21, 2018 at 3:29 PM, Oliver Chang ***@***.***> wrote:
Maybe we should be using LIBCXXABI_USE_LLVM_UNWINDER=ON and
LIBCXXABI_ENABLE_STATIC_UNWINDER=ON when building libcxxabi?
https://github.com/google/oss-fuzz/blob/master/infra/base-
images/base-clang/checkout_build_install_llvm.sh#L55
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1099 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAZuSlzJnZGKeggr2-7Ykws-JWWS6bLpks5tM8hDgaJpZM4Rl12f>
.
|
Yep, just CCed you on those bugs. |
Did you try the unwinder flags? |
Nope, let us try that first. |
Ok I take that back, these flags actually break msan:
|
@eugenis could this be related to https://bugs.llvm.org/show_bug.cgi?id=31877 ? |
Yes, I think you are right. It's exactly PR31877.
Apparently, MSan is not used with C++ exceptions that often.
Here is an example that triggers the bug for me:
#include <sanitizer/msan_interface.h>
volatile long z;
…__attribute__((noinline)) void f(long a, long b, long c, long d) { z =
a+b+c+d; }
__attribute__((noinline)) void throw_stuff() {
throw 5;
}
int main() {
long x;
__msan_poison(&x, sizeof(x));
f(0, 0, 0, x);
try {
throw_stuff();
} catch (const int &e) {
}
}
I don't know what to do with it. We can not intercept __gxx_personality0
because libcxxabi is linked statically; even if it was not, an interceptor
could not be added because it would break exceptions in the static link.
We could put a nosanitize("memory") attribute on __gxx_personality0. Or
just blacklist it! Could you try that? Remember that you need to rebuild
libc++abi for the blacklist to work.
On Sun, Feb 4, 2018 at 9:58 PM, Oliver Chang ***@***.***> wrote:
@eugenis <https://github.com/eugenis> could this be related to
https://bugs.llvm.org/show_bug.cgi?id=31877 ?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1099 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAZuSg2LQvj4tQQublO0NuBgf8b-rE39ks5tRpihgaJpZM4Rl12f>
.
|
Looks like blacklisting _gxx_personality* did the trick. Thanks! |
Actually breaks msan.
__gxx_personality_v0 seems to be tricky and makes some unknown problems. It's also skipped in address sanitizer as a default blacklist function[1]. This patch skips __gxx_personality_v0 in plthook list to avoid test failures in i386. Before: 185 exception2 : NG NG NG NG NG NG NG NG NG NG 186 exception3 : NG NG NG NG NG NG NG NG NG NG After: 185 exception2 : OK OK OK OK OK OK OK OK OK OK 186 exception3 : OK OK OK OK OK OK OK OK OK OK [1] google/oss-fuzz#1099 Signed-off-by: Honggyu Kim <honggyu.kp@gmail.com>
__gxx_personality_v0 seems to be tricky and makes some unknown problems as described in [1]. It's also skipped in memory sanitizer as a default blacklist function[2]. This patch skips __gxx_personality_v0 in plthook list to avoid test failures in i386. Before: 185 exception2 : NG NG NG NG NG NG NG NG NG NG 186 exception3 : NG NG NG NG NG NG NG NG NG NG After: 185 exception2 : OK OK OK OK OK OK OK OK OK OK 186 exception3 : OK OK OK OK OK OK OK OK OK OK [1] google/oss-fuzz#1099 [2] https://reviews.llvm.org/D69587 Signed-off-by: Honggyu Kim <honggyu.kp@gmail.com>
__gxx_personality_v0 seems to be tricky and makes some unknown problems as described in [1]. It's also skipped in memory sanitizer as a default blacklist function[2]. This patch skips __gxx_personality_v0 in plthook list to avoid test failures in i386. Before: 185 exception2 : NG NG NG NG NG NG NG NG NG NG 186 exception3 : NG NG NG NG NG NG NG NG NG NG After: 185 exception2 : OK OK OK OK OK OK OK OK OK OK 186 exception3 : OK OK OK OK OK OK OK OK OK OK [1] google/oss-fuzz#1099 [2] https://reviews.llvm.org/D69587 Signed-off-by: Honggyu Kim <honggyu.kp@gmail.com>
__gxx_personality_v0 seems to be tricky and makes some unknown problems as described in [1]. It's also skipped in memory sanitizer as a default blacklist function[2]. This patch skips __gxx_personality_v0 in plthook list to avoid test failures in i386. Before: 185 exception2 : NG NG NG NG NG NG NG NG NG NG 186 exception3 : NG NG NG NG NG NG NG NG NG NG After: 185 exception2 : OK OK OK OK OK OK OK OK OK OK 186 exception3 : OK OK OK OK OK OK OK OK OK OK [1] google/oss-fuzz#1099 [2] https://reviews.llvm.org/D69587 Signed-off-by: Honggyu Kim <honggyu.kp@gmail.com>
__gxx_personality_v0 seems to be tricky and makes some unknown problems as described in [1]. It's also skipped in memory sanitizer as a default blacklist function[2]. This patch skips __gxx_personality_v0 in plthook list to avoid test failures in i386. Before: 185 exception2 : NG NG NG NG NG NG NG NG NG NG 186 exception3 : NG NG NG NG NG NG NG NG NG NG After: 185 exception2 : OK OK OK OK OK OK OK OK OK OK 186 exception3 : OK OK OK OK OK OK OK OK OK OK [1] google/oss-fuzz#1099 [2] https://reviews.llvm.org/D69587 Signed-off-by: Honggyu Kim <honggyu.kp@gmail.com>
See issues https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=4465 , https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=4470 and https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=5525 .
The text was updated successfully, but these errors were encountered: