Add another malloc(0) test.

In the past, we've pondered letting malloc(0) return a non-null
zero-page (or otherwise umappable) pointer to immediately catch
any attempt to reference it. The simplest implementation for
this would return the same pointer for all malloc(0) calls, which
would then make it impossible to tell if two objects actually shared
the same malloc(0)'d buffer. It is doubtful that PDFium actually
depends on this behavior, but add a test to enforce this should
someone down the road want to implement the malloc(0) protection
(returning distinct unreferenceable pointers would be legitimate).

Change-Id: I6f1fd46dc9e2560ab1efc475dcd33ba85f7c11d3
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/62650
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
diff --git a/core/fxcrt/fx_memory_unittest.cpp b/core/fxcrt/fx_memory_unittest.cpp
index 2d7a166..d8274f9 100644
--- a/core/fxcrt/fx_memory_unittest.cpp
+++ b/core/fxcrt/fx_memory_unittest.cpp
@@ -21,7 +21,10 @@
 
 TEST(fxcrt, FX_AllocZero) {
   uint8_t* ptr = FX_Alloc(uint8_t, 0);
+  uint8_t* ptr2 = FX_Alloc(uint8_t, 0);
   EXPECT_TRUE(ptr);  // Malloc(0) is distinguishable from OOM.
+  EXPECT_NE(ptr, ptr2);  // Each malloc(0) is distinguishable.
+  FX_Free(ptr2);
   FX_Free(ptr);
 }