diff options
author | Jakub Jelinek <jakub@redhat.com> | 2019-10-18 19:18:21 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2019-10-18 19:18:21 +0200 |
commit | 9e0d2031c32b748eaf3ea89082c0f8658edcbf82 (patch) | |
tree | f3ee37e008299bb0297e5cdeca441c03a1110291 /gcc/ggc-page.c | |
parent | f4c8d44e27e90e6d822d02f4853e3f6ab80382ff (diff) |
re PR middle-end/92153 (ICE / segmentation fault, use-after-free at gcc/ggc-page.c:1159)
PR middle-end/92153
* ggc-page.c (release_pages): Read g->alloc_size before free rather
than after it.
From-SVN: r277157
Diffstat (limited to 'gcc/ggc-page.c')
-rw-r--r-- | gcc/ggc-page.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/ggc-page.c b/gcc/ggc-page.c index 4560206ac2e..a18d7a9d826 100644 --- a/gcc/ggc-page.c +++ b/gcc/ggc-page.c @@ -1155,8 +1155,8 @@ release_pages (void) { *gp = g->next; G.bytes_mapped -= g->alloc_size; - free (g->allocation); n1 += g->alloc_size; + free (g->allocation); } else gp = &g->next; |