[scudo] 32-bit quarantine sizes adjustments and bug fixes

Summary:
The local and global quarantine sizes were not offering a distinction for
32-bit and 64-bit platforms. This is addressed with lower values for 32-bit.

When writing additional tests for the quarantine, it was discovered that when
calling some of the allocator interface function prior to any allocation
operation having occured, the test would crash due to the allocator not being
initialized. This was addressed by making sure the allocator is initialized
for those scenarios.

Relevant tests were added in interface.cpp and quarantine.cpp.

Last change being the removal of the extraneous link dependencies for the
tests thanks to rL293220, anf the addition of the gc-sections linker flag.

Reviewers: kcc, alekseyshl

Reviewed By: alekseyshl

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D29341

llvm-svn: 294037
diff --git a/compiler-rt/test/scudo/overflow.cpp b/compiler-rt/test/scudo/overflow.cpp
index c93a544..d128245 100644
--- a/compiler-rt/test/scudo/overflow.cpp
+++ b/compiler-rt/test/scudo/overflow.cpp
@@ -10,20 +10,20 @@
 
 int main(int argc, char **argv)
 {
-  assert(argc == 2);
   ssize_t offset = sizeof(void *) == 8 ? 8 : 0;
+
+  assert(argc == 2);
+
   if (!strcmp(argv[1], "malloc")) {
     // Simulate a header corruption of an allocated chunk (1-bit)
     void *p = malloc(1U << 4);
-    if (!p)
-      return 1;
+    assert(p);
     ((char *)p)[-(offset + 1)] ^= 1;
     free(p);
   }
   if (!strcmp(argv[1], "quarantine")) {
     void *p = malloc(1U << 4);
-    if (!p)
-      return 1;
+    assert(p);
     free(p);
     // Simulate a header corruption of a quarantined chunk
     ((char *)p)[-(offset + 2)] ^= 1;