re PR tree-optimization/91756 (g++.dg/lto/alias-3 FAILs)
[gcc.git] / libbacktrace / mmap.c
index 32fcba6239927f19ed36f0f2a4fec63a92457e77..1b6366496aa2c851e413034a54c2c2c39e8b0116 100644 (file)
@@ -1,5 +1,5 @@
 /* mmap.c -- Memory allocation with mmap.
-   Copyright (C) 2012-2018 Free Software Foundation, Inc.
+   Copyright (C) 2012-2019 Free Software Foundation, Inc.
    Written by Ian Lance Taylor, Google.
 
 Redistribution and use in source and binary forms, with or without
@@ -321,5 +321,7 @@ backtrace_vector_release (struct backtrace_state *state,
   backtrace_free (state, (char *) vec->base + aligned, alc,
                  error_callback, data);
   vec->alc = 0;
+  if (vec->size == 0)
+    vec->base = NULL;
   return 1;
 }