diff options
author | Patrick Georgi <patrick@georgi-clan.de> | 2014-09-05 23:54:04 +0200 |
---|---|---|
committer | Patrick Georgi <patrick@georgi-clan.de> | 2014-09-06 09:21:07 +0200 |
commit | 34e76152351a9c846d850064990a37e3d453d97f (patch) | |
tree | f4a6171bb92c8a08cfc196d7abf5437f70a4fccd /util/romcc | |
parent | 2d7bd8a6ebf6844b0cdef80eaaef69f39d08f076 (diff) | |
download | coreboot-34e76152351a9c846d850064990a37e3d453d97f.tar.xz |
romcc: avoid use-after-free
Windows bugchecks on this for a while, so we ifndef'd the free() call out.
Now some Linuxes (depending on their glibc) also fail on it, so just
remove the call altogether at the cost of some leaked memory (couple
hundred kilobytes) because tracking down the precise fix is too hard.
In case someone wants to fix it, valgrind sees the issues, so
revert this change and work on romcc's memory management until valgrind
is happy.
To get a fix in, provide a good explanation why your change is actually
the right way to fix it - for silencing valgrind, this change will do.
Change-Id: Iae3f847e09a0d7bcb8bb4f50983a1b0727570b23
Signed-off-by: Patrick Georgi <patrick@georgi-clan.de>
Reviewed-on: http://review.coreboot.org/6846
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Tested-by: build bot (Jenkins)
Diffstat (limited to 'util/romcc')
-rw-r--r-- | util/romcc/romcc.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/util/romcc/romcc.c b/util/romcc/romcc.c index 01d836cef3..ad90a1e4ef 100644 --- a/util/romcc/romcc.c +++ b/util/romcc/romcc.c @@ -15161,9 +15161,6 @@ static void free_basic_block(struct compile_state *state, struct block *block) } } memset(block, -1, sizeof(*block)); -#ifndef WIN32 - xfree(block); -#endif } static void free_basic_blocks(struct compile_state *state, |