GNU bug report logs -
#46495
28.0.50; [native-comp] Build fails for 32bit --with-wide-int
Previous Next
Full log
View this message in rfc822 format
> From: David Malcolm <dmalcolm <at> redhat.com>
> Cc: akrl <at> sdf.org, andrewjmoreton <at> gmail.com, 46495 <at> debbugs.gnu.org
> Date: Wed, 31 Mar 2021 09:03:33 -0400
>
> > David, what's the story with these temporary directories?
>
> They're meant to be cleaned up automatically by libgccjit: on
> gcc_jit_result_release for a successful compilation, or at the end of
> gcc_jit_context_compile* for a failed compilation.
>
> The removal code is in gcc::jit::tempdir::~tempdir in gcc/jit/jit-
> tempdir.c, maybe there's a bug there? (perhaps only affecting Windows?)
> It calls unlink on everything it "knows" about, and them rmdir on the
> directory. I see now that I'm not checking for errors on those unlink
> and rmdir calls.
maybe you are relying on the Posix semantics whereby you can remove
files that are still in use, and the OS will remove them when the last
user closes the file? That's not going to work on Windows, you need
to close first and remove later.
When does the object go out of scope, and its destructor called?
> Is the code setting GCC_JIT_BOOL_OPTION_KEEP_INTERMEDIATES to true,
> perhaps?
No. the code is just tut01d-hello-world.c as it is given here:
https://gcc.gnu.org/onlinedocs/jit/intro/tutorial01.html
The only variation (as described in my previous messages) is that I
added
gcc_jit_context_set_bool_option (
ctxt,
GCC_JIT_BOOL_OPTION_DEBUGINFO,
1);
in one of the variants I compiled. But the variant with the above
added actually behaves correctly and removes the temporary directory
upon exit.
This bug report was last modified 4 years and 43 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.