[Bug jit/64206] fake.so is unlinked too early for some users

dmalcolm at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Dec 9 20:00:00 GMT 2014


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64206

--- Comment #3 from David Malcolm <dmalcolm at gcc dot gnu.org> ---
Author: dmalcolm
Date: Tue Dec  9 20:00:07 2014
New Revision: 218533

URL: https://gcc.gnu.org/viewcvs?rev=218533&root=gcc&view=rev
Log:
Add jit-tempdir.{c|h}

gcc/jit/ChangeLog:
        PR jit/64206
    * Make-lang.in (jit_OBJS): Add jit/jit-tempdir.o.
    * jit-common.h (gcc::jit::tempdir): New forward decl.
    * jit-playback.c: Include jit-tempdir.h.
    (gcc::jit::playback::context::context): Initialize m_tempdir.
    (gcc::jit::playback::context::~context): Move tempdir
    cleanup to new file jit-tempdir.c
    (make_tempdir_path_template): Move to new file jit-tempdir.c.
    (gcc::jit::playback::context::compile): Move tempdir creation
    to new tempdir object in new file jit-tempdir.c.
    (gcc::jit::playback::context::make_fake_args): Get path from
    tempdir object rather than from member data.
    (gcc::jit::playback::context::convert_to_dso): Likewise.
    (gcc::jit::playback::context::dlopen_built_dso): Likewise.
    (gcc::jit::playback::context::dump_generated_code): Likewise.
    (gcc::jit::playback::context::get_path_c_file): New function.
    (gcc::jit::playback::context::get_path_s_file): New function.
    (gcc::jit::playback::context::get_path_so_file): New function.
    * jit-playback.h (gcc::jit::playback::context::get_path_c_file):
    New function.
    (gcc::jit::playback::context::get_path_s_file): New function.
    (gcc::jit::playback::context::get_path_so_file): New function.
    (gcc::jit::playback::context): Move fields "m_path_template",
    "m_path_tempdir", "m_path_c_file", "m_path_s_file",
    "m_path_so_file" to new jit::tempdir class; add field "m_tempdir".
    * jit-tempdir.c: New file.
    * jit-tempdir.h: New file.


Added:
    trunk/gcc/jit/jit-tempdir.c
    trunk/gcc/jit/jit-tempdir.h
Modified:
    trunk/gcc/jit/ChangeLog
    trunk/gcc/jit/Make-lang.in
    trunk/gcc/jit/jit-common.h
    trunk/gcc/jit/jit-playback.c
    trunk/gcc/jit/jit-playback.h



More information about the Gcc-bugs mailing list