Skip to content

Commit

Permalink
use a better pthread_attr junk filling pattern
Browse files Browse the repository at this point in the history
Guarantee that junk filled pointers will fault, at least on pure 64-bit.
  • Loading branch information
thestinger committed Mar 2, 2020
1 parent 0eaef1a commit 64f1cc2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libc/bionic/pthread_attr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ int pthread_attr_init(pthread_attr_t* attr) {

__BIONIC_WEAK_FOR_NATIVE_BRIDGE
int pthread_attr_destroy(pthread_attr_t* attr) {
memset(attr, 0x42, sizeof(pthread_attr_t));
memset(attr, 0xdf, sizeof(pthread_attr_t));
return 0;
}

Expand Down

0 comments on commit 64f1cc2

Please sign in to comment.